max_stars_repo_path
stringlengths
4
261
max_stars_repo_name
stringlengths
6
106
max_stars_count
int64
0
38.8k
id
stringlengths
1
6
text
stringlengths
7
1.05M
agda/Data/MoreNatProp.agda
florence/esterel-calculus
3
7410
module Data.MoreNatProp where open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; cong) open import Data.Nat as Nat using (ℕ ; suc ; zero ; _≤′_ ; _≤_ ; _+_ ; s≤s ; z≤n ; ≤′-refl ; ≤′-step ; _⊔_) open import Data.Nat.Properties as NatP using (≤⇒≤′ ; ≤′⇒≤ ; m≤m+n ; s≤′s ; ≤-stepsˡ ; ≤⇒pred≤) open import Data.Nat.Properties.Simple as NatPS using (+-comm ; +-suc) ≤-trans : ∀ {x y z} -> x ≤ y -> y ≤ z -> x ≤ z ≤-trans z≤n _ = z≤n ≤-trans (s≤s m≤n) (s≤s n≤o) = s≤s (≤-trans m≤n n≤o) ≤′-trans : ∀ {x y z} -> x ≤′ y -> y ≤′ z -> x ≤′ z ≤′-trans xy yz = ≤⇒≤′ (≤-trans (≤′⇒≤ xy) (≤′⇒≤ yz)) ≤′+r : ∀ {x y z} -> x ≤′ y -> z + x ≤′ z + y ≤′+r {x} {y} {zero} x≤′y = x≤′y ≤′+r {x} {y} {suc z} x≤′y = s≤′s (≤′+r {x} {y} {z} x≤′y) ≤′+l : ∀ {x y z} -> x ≤′ y -> x + z ≤′ y + z ≤′+l {x} {y} {z} x≤′y rewrite +-comm x z | +-comm y z = ≤′+r{x}{y}{z} x≤′y ≡is≤′ : ∀ {p q} -> p ≡ q -> p ≤′ q ≡is≤′ p≡q rewrite p≡q = ≤′-refl ≤+b : ∀ x y z w -> x ≤ z -> y ≤ w -> x + y ≤ z + w ≤+b .0 y z w Nat.z≤n y≤w = ≤-stepsˡ z y≤w ≤+b .(suc x) y .(suc z) w (Nat.s≤s{x}{z} x≤z) y≤w = s≤s (≤+b x y z w x≤z y≤w) ≤′+b : ∀ x y z w -> x ≤′ z -> y ≤′ w -> x + y ≤′ z + w ≤′+b x y z w x≤′z y≤′w = ≤⇒≤′ (≤+b x y z w (≤′⇒≤ x≤′z) (≤′⇒≤ y≤′w)) suc≤′⇒≤′ : ∀ x y -> suc x ≤′ y -> x ≤′ y suc≤′⇒≤′ x .(suc x) ≤′-refl = ≤′-step ≤′-refl suc≤′⇒≤′ x (suc n) (≤′-step sucx≤′y) = ≤′-step (suc≤′⇒≤′ x n sucx≤′y) ⊔-sym : ∀ n m -> n ⊔ m ≡ m ⊔ n ⊔-sym zero zero = refl ⊔-sym zero (suc m) = refl ⊔-sym (suc n) zero = refl ⊔-sym (suc n) (suc m) = cong suc (⊔-sym n m)
src/z3/multiworld.asm
PJBoy/alttp_sm_combo_randomizer_rom
31
2606
<filename>src/z3/multiworld.asm ; ALTTP Multiworld support ; org $f81000 ; Lookup item in ALTTP table and replace as needed, return as 8-bit A alttp_multiworld_replace_item: lsr !MULTIWORLD_SWAP : bcs .exit ; If !MULTIWORLD_SWAP is set, skip one item swap CMP.b #$20 : BEQ .exit ; Crystal CMP.b #$26 : BEQ .exit ; Piece of heart completion heart CMP.b #$2E : BEQ .exit ; red refill CMP.b #$2F : BEQ .exit ; green refill CMP.b #$30 : BEQ .exit ; Blue refill CMP.b #$32 : BEQ .exit ; Big key (guard) CMP.b #$37 : BEQ .exit ; Pendant CMP.b #$38 : BEQ .exit ; Pendant CMP.b #$39 : BEQ .exit ; Pendant bra .next .exit jmp .end .next phx : phy : php %ai16() tax lda $10 and #$00ff cmp #$0007 ; Only check for shops in dungeon mode bne .noShop lda $A0 cmp #$00FF : BEQ .paradoxShop cmp #$011C : BEQ .bombShop ; Bomb shop cmp #$010F : BEQ .shop cmp #$011F : BEQ .shop cmp #$0110 : BEQ .shop cmp #$0112 : BEQ .shop cmp #$0100 : BEQ .shop ; LW Chest game 1 cmp #$0118 : BEQ .shop ; LW Chest game 2 bra .noShop .paradoxShop lda $A8 cmp #$0014 : BEQ .shop bra .noShop .bombShop lda $A9 cmp #$0200 : beq .shop bra .noShop .shop txa : bra .noReplace .noShop txa and #$00ff ; Mask off any extra high bits left in A asl #3 : tax ora #$8000 ; Set high bit in item index for ALTTP to not clash with SM indexes sta !MULTIWORLD_GIVE_INDEX ; Save the multiworld table index for later lda.l alttp_rando_item_table, x ; Load multiworld item type sta !MULTIWORLD_PICKUP ; Make sure we always set this flag so it's updated depending on item type beq .ownItem sta !MULTIWORLD_DIALOG lda.l alttp_rando_item_table+$4, x sta !MULTIWORLD_GIVE_PLAYER ; Store multiworld owner sta !MULTIWORLD_DIALOG_PLAYER .ownItem lda.l alttp_rando_item_table+$2, x sta !MULTIWORLD_GIVE_ITEM sta !MULTIWORLD_DIALOG_ITEM .noReplace plp : ply : plx .end stz !MULTIWORLD_SWAP rtl alttp_multiworld_replace_graphics: lsr !MULTIWORLD_SWAP : bcs .end ; If !MULTIWORLD_SWAP is set, skip one item swap CMP.b #$20 : BEQ .end ; Crystal CMP.b #$26 : BEQ .end ; Piece of heart completion heart CMP.b #$2E : BEQ .end ; red refill CMP.b #$2F : BEQ .end ; green refill CMP.b #$30 : BEQ .end ; Blue refill CMP.b #$32 : BEQ .end ; Big key (guard) CMP.b #$37 : BEQ .end ; Pendant CMP.b #$38 : BEQ .end ; Pendant CMP.b #$39 : BEQ .end ; Pendant phx : phy : php %ai16() and #$00ff ; Mask off any extra high bits left in A asl #3 : tax lda.l alttp_rando_item_table+$2, x plp : ply : plx .end stz !MULTIWORLD_SWAP rtl alttp_mw_handle_queue: pha : phx : phy : php %ai16() lda config_multiworld bne + jmp .end + ; lda.l !SRAM_MW_RPTR ; Don't loop in ALTTP because we have to wait for item pickup to actually start ; cmp.l !SRAM_MW_WPTR lda.l !SRAM_MW_ITEMS_RECV_RPTR cmp.l !SRAM_MW_ITEMS_RECV_WPTR beq .end %a8() lda.l !MULTIWORLD_PICKUP bne .cantGive ; If a pickup is happening, don't queue another yet lda $02E4 bne .cantGive ; Don't queue pickups if link is not allowed to move lda $03EF bne .cantGive ; Don't queue pickups when link is forced into "sword up" lda $5d ; Check links state cmp #$00 ; Only allow ground state, swimming, dashing and bunny states beq .next cmp #$04 beq .next cmp #$11 beq .next cmp #$17 beq .next bra .cantGive .next lda $10 ; Only get items if we're still in dungeon or overworld mode cmp #$07 beq .continue cmp #$09 beq .continue bra .cantGive .continue ; Always induce a 10 frame waiting period of "normal gameplay" lda $11 bne .cantGive ; Make sure submodule is 0 lda !MULTIWORLD_DELAY beq .cantGive dec : sta !MULTIWORLD_DELAY cmp #$00 beq + bra .end + %a16() ; lda.l !SRAM_MW_RPTR lda.l !SRAM_MW_ITEMS_RECV_RPTR asl #2 : tax ; lda.l !SRAM_MW_RECVQ, x : sta $7e ; lda.l !SRAM_MW_RECVQ+$2, x : sta $7c lda.l !SRAM_MW_ITEMS_RECV, x : sta $7e lda.l !SRAM_MW_ITEMS_RECV+$2, x : sta $7c jsr alttp_mw_receive_item lda.l !SRAM_MW_ITEMS_RECV_RPTR inc a sta.l !SRAM_MW_ITEMS_RECV_RPTR bra .end .cantGive lda #$0A sta !MULTIWORLD_DELAY ; Wait 10 frames before trying to give item again .end plp : ply : plx : pla jsl $078000 ; JSL Player_Main (do stoops lonk things) rtl alttp_mw_no_rupees: pha lda config_multiworld beq + lda !MULTIWORLD_PICKUP cmp #$01 beq .end + pla jsl GiveRupeeGift rtl .end pla rtl alttp_mw_receive_item: ; Item in $7c, World in $7e lda $7e sta.l !MULTIWORLD_DIALOG_PLAYER lda #$0002 sta.l !MULTIWORLD_PICKUP ; 1 = pickup multiworld for other player, 2 = get multiworld item from other player sta.l !MULTIWORLD_DIALOG ; dialog 2 = we got item from other player %ai8() lda #$01 sta.l !MULTIWORLD_SWAP ldy $7c sty !MULTIWORLD_DIALOG_ITEM jsl Link_ReceiveItem ; Get item in $7c %ai16() rts alttp_mw_send_item: phx : phy : php ; Item in A %ai16() lda.l !MULTIWORLD_GIVE_ITEM ; This gets set by the replacement routine and #$00ff ; so that progressive items will send the progressive id correctly tax lda.l !MULTIWORLD_GIVE_PLAYER tay lda.l !MULTIWORLD_GIVE_INDEX jsl mw_write_message plp : ply : plx rtl alttp_multiworld_dialog: lda $1cf0 bmi .multiworldDialog ; If not multiworld dialog, return asl : tax jml $0eee8d .multiworldDialog ; Item Name lda !MULTIWORLD_DIALOG_ITEM and #$00ff cmp #$00b0 bcc .alttpItem sec sbc #$00b0 bra + .alttpItem clc adc #$0030 + %a8() sta $211b : xba : sta $211b lda #$14 sta $211c %ai16() ldx $2134 ldy #$0000 phx : tyx : lda #$0074 : sta $7f1200, x : plx : iny - phx lda.l alttp_mw_item_names, x and #$00ff beq ++ tax lda.l alttp_dialog_char_table-$20, x and #$00ff xba tyx sta.l $7f1200, x iny #2 plx inx bra - ++ plx phx : tyx : lda #$0075 : sta $7f1200, x : plx : iny lda $1cf0 and #$00ff cmp #$0000 beq + clc adc #$0013 + tax - phx lda.l alttp_mw_dialogtable, x and #$00ff beq ++ tax lda.l alttp_dialog_char_table-$20, x and #$00ff xba tyx sta.l $7f1200, x iny #2 plx inx bra - ++ plx phx : tyx : lda #$0076 : sta $7f1200, x : plx : iny lda #$ff00 tyx sta.l $7f1200, x sta.l $7f1200+$2, x sta.l $7f1200+$4, x tya : clc : adc #$0006 : tay lda !MULTIWORLD_DIALOG_PLAYER and #$00ff asl #4 : tax - phx lda.l rando_player_table, x and #$00ff cmp #$0000 ; FIXME: this will break if we use extended player data (needs to be fixed by then) beq ++ tax lda.l alttp_dialog_char_table-$20, x and #$00ff xba tyx sta.l $7f1200, x iny #2 plx inx bra - ++ plx tyx lda #$FF00 sta.l $7f1200, x sta.l $7f1200+$2, x sta.l $7f1200+$4, x sta.l $7f1200+$6, x tya : clc : adc #$0008 : tay stz !MULTIWORLD_DIALOG stz !MULTIWORLD_DIALOG_ITEM stz !MULTIWORLD_DIALOG_PLAYER tyx jml $0eef1c ; Return back to original code alttp_mw_dialogtable: ; Dialog boxes are 19 characters wide ; 0123456789ABCDEF012 .give db " found for player ", $00 .get db " received from ", $00 alttp_mw_item_names: db " Grappling Beam ", $00 ; 00 (b0) (sm items) db " X-Ray Scope ", $00 db " Varia Suit ", $00 db " Spring Ball ", $00 db " Morphing Ball ", $00 db " Screw Attack ", $00 db " Gravity Suit ", $00 db " Hi-Jump Boots ", $00 db " Space Jump ", $00 db " Bomb ", $00 db " Speed Booster ", $00 db " Charge Beam ", $00 db " Ice Beam ", $00 db " Wave Beam ", $00 db " ~~ S P a z E R ~~ ", $00 db " Plasma Beam ", $00 db " Energy Tank ", $00 db " Reserve Tank ", $00 db " Missiles ", $00 db " Super Missiles ", $00 db " Power Bombs ", $00 db " ", $00 ;15 db " ", $00 ;16 db " ", $00 ;17 db " ", $00 ;18 db " ", $00 ;19 db " ", $00 ;1A db " ", $00 ;1B db " ", $00 ;1C db " ", $00 ;1D db " ", $00 ;1E db " ", $00 ;1F db " Crateria L 1 Card ", $00 ; 20 db " Crateria L 2 Card ", $00 ; 21 db " Crateria Boss Card", $00 ; 22 db " Brinstar L 1 Card ", $00 ; 20 db " Brinstar L 2 Card ", $00 ; 21 db " Brinstar Boss Card", $00 ; 22 db " Norfair L 1 Card ", $00 ; 20 db " Norfair L 2 Card ", $00 ; 21 db " Norfair Boss Card ", $00 ; 22 db " Maridia L 1 Card ", $00 ; 20 db " Maridia L 2 Card ", $00 ; 21 db " Maridia Boss Card ", $00 ; 22 db " W.Ship L 1 Card ", $00 ; 2C db " W.Ship Boss Card ", $00 ; 2D db "L.Norfair L 1 Card ", $00 ; 2E db "L.Norfair Boss Card", $00 ; 2F db " ", $00 ; $30+ (alttp items) db " Master Sword ", $00 db " Tempered Sword ", $00 db " Gold Sword ", $00 db " Toy Shield ", $00 db " Red Shield ", $00 db " Mirror Shield ", $00 db " Fire Rod ", $00 db " Ice Rod ", $00 db " Hammer ", $00 db " Hookshot, BOING! ", $00 db " Bow ", $00 db " Blue Boomerang ", $00 db " Magic Powder ", $00 db " ", $00 db " Bombos ", $00 db " Ether ", $00 db " Quake ", $00 db " Lamp ", $00 db " Shovel ", $00 db " Flute ", $00 db " Cane of Somaria ", $00 db " Bottle ", $00 db " Piece of Heart ", $00 db " Cane of Byrna ", $00 db " Magic Cape ", $00 db " Magic Mirror ", $00 db " Power Glove ", $00 db " Titan's Mitt ", $00 db " Book of Mudora ", $00 db " Zora's Flippers ", $00 db " Moon Pearl ", $00 db " ", $00 db " Bug Net ", $00 db " Blue Mail ", $00 db " Red Mail ", $00 db " ", $00 db " ", $00 db " Heart Container ", $00 db " One Bomb ", $00 db " Three Bombs ", $00 db " Mushroom ", $00 db " Red Boomerang ", $00 db " Red Potion ", $00 db " Green Potion ", $00 db " Blue Potion ", $00 db " ", $00 db " ", $00 db " ", $00 db " Ten Bombs ", $00 db " ", $00 db " ", $00 db " A single Rupee ", $00 db " Five Rupees ", $00 db " Twenty Rupees ", $00 db " ", $00 db " ", $00 db " ", $00 db " Bow ", $00 db " Silver Arrows ", $00 db " Bee ", $00 db " Fairy ", $00 db " Heart Container ", $00 db " Heart Container ", $00 db "One Hundred Rupees ", $00 db " Fifty Rupees ", $00 db " ", $00 db " A single Arrow ", $00 db " Ten Arrows ", $00 db " ", $00 db " 300 Rupees ", $00 db " Twenty Rupees ", $00 db " A good Bee ", $00 db " Fighter's Sword ", $00 db " ", $00 db " Pegasus Boots ", $00 db " ", $00 db " ", $00 db " Half Magic ", $00 db " Quarter Magic ", $00 db " Master Sword ", $00 db " 5 Bomb Capacity ", $00 db " 10 Bomb Capacity ", $00 db " 5 Arrow Capacity ", $00 db " 10 Arrow Capactiy ", $00 db " ", $00 db " ", $00 db " ", $00 db " Silver Arrows ", $00 ; 58 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " Sword Upgrade ", $00 db " Shield Upgrade ", $00 db " Armour Upgrade ", $00 db " Glove Upgrade ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 db " ", $00 ; 6F db " ", $00 ; 70 db " ", $00 db " Ganon's Tower Map ", $00 db " Turtle Rock Map ", $00 db " Thieves' Town Map ", $00 db " Tower of Hera Map ", $00 db " Ice Palace Map ", $00 db " Skull Woods Map ", $00 db " Misery Mire Map ", $00 db " Dark Palace Map ", $00 db " Swamp Palace Map ", $00 db " ", $00 db " Desert Palace Map ", $00 db " Eastern Palace Map", $00 db " ", $00 db " Hyrule Castle Map ", $00 ; 7F db " ", $00 ; 80 db " ", $00 db " G. Tower Compass ", $00 db "Turtle Rock Compass", $00 db " T. Town Compass ", $00 db " Hera Compass ", $00 db "Ice Palace Compass ", $00 db "Skull Woods Compass", $00 db "Misery Mire Compass", $00 db "Dark Palace Compass", $00 db " Swamp P. Compass ", $00 db " ", $00 db " Desert P. Compass ", $00 db "Eastern P. Compass ", $00 db " ", $00 db " ", $00 ; 8F db " ", $00 ; 90 db " ", $00 db " Ganon's Tower B.K ", $00 db " Turtle Rock B.K ", $00 db " Thieves' Town B.K ", $00 db " Tower of Hera B.K ", $00 db " Ice Palace B.K ", $00 db " Skull Woods B.K ", $00 db " Misery Mire B.K ", $00 db " Dark Palace B.K ", $00 db " Swamp Palace B.K ", $00 db " ", $00 db " Desert Palace B.K ", $00 db " Eastern Palace B.K", $00 db " ", $00 db " ", $00 ; 9F db " Hyrule Castle Key ", $00 ; A0 db " Sewers Key ", $00 db " Eastern Palace Key", $00 db " Desert Palace Key ", $00 db " Castle Tower Key ", $00 db " Swamp Palace Key ", $00 db " Dark Palace Key ", $00 db " Misery Mire Key ", $00 db " Skull Woods Key ", $00 db " Ice Palace Key ", $00 db " Tower of Hera Key ", $00 db " Thieves' Town Key ", $00 db " Turtle Rock Key ", $00 db " Ganon's Tower Key ", $00 db " ", $00 db " ", $00 ; AF alttp_dialog_char_table: ; Each unsupported symbol translate to "?" $C6 for visual indication ; <sp> ! " # $ % & ' ( ) * + , - . / db $FF, $C7, $D8, $4C, $C6, $C6, $C6, $D8, $C6, $C6, $C6, $C6, $C8, $C9, $CD, $C6 ; 0 1 2 3 4 5 6 7 8 9 : ; < = > ? db $A0, $A1, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $4A, $C6, $C6, $C6, $C6, $C6 ; @ A B C D E F G H I J K L M N O db $4B, $AA, $AB, $AC, $AD, $AE, $AF, $B0, $B1, $B2, $B3, $B4, $B5, $B6, $B7, $B8 ; P Q R S T U V W X Y Z [ \ ] ^ _ db $B9, $BA, $BB, $BC, $BD, $BE, $BF, $C0, $C1, $C2, $C3, $C6, $C6, $C6, $C6, $C6 ; Lowercase Letters ; ` a b c d e f g h i j k l m n o db $C6, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3A, $3B, $3C, $3D, $3E ; p q r s t u v w x y z { | } ~ <del> db $3F, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $C6, $C6, $C6, $CE, $C6 alttp_mw_check_softreset: lda $4219 : sta $01 cmp #$30 bne .end lda $00 cmp #$30 bne .end lda.l !SRAM_SAVING bne .end jmp alttp_mw_softreset .end rtl alttp_mw_softreset: sei ; Disable IRQ's %i16() %a8() lda #$01 sta $420d ; Toggle FastROM on lda #$00 sta $4200 ; Disable NMI and Joypad autoread sta $420c ; Disable H-DMA lda #$8f sta $2100 ; Enable PPU force blank jsl sm_spc_reset ; Kill the ALTTP music engine and put the SPC in IPL upload mode ; Gotta do this before switching RAM contents - bit $4212 ; Wait for a fresh NMI bmi - - bit $4212 bpl - %ai16() ldx #$1ff0 txs ; Adjust stack pointer lda #$ffff ; Set the "game flag" to SM so IRQ's/NMI runs using the sta !SRAM_CURRENT_GAME ; correct game jsl sm_fix_checksum ; Fix SRAM checksum (otherwise SM deletes the file on load) jml $80841C ; Jump to SM boot code
programs/oeis/131/A131061.asm
karttu/loda
1
89385
; A131061: Triangle read by rows: T(n,k) = 4*binomial(n,k) - 3 for 0 <= k <= n. ; 1,1,1,1,5,1,1,9,9,1,1,13,21,13,1,1,17,37,37,17,1,1,21,57,77,57,21,1,1,25,81,137,137,81,25,1,1,29,109,221,277,221,109,29,1,1,33,141,333,501,501,333,141,33,1,1,37,177,477,837,1005,837,477,177,37,1,1,41,217,657,1317,1845,1845,1317,657,217,41,1,1,45,261,877,1977,3165,3693,3165,1977,877,261,45,1,1,49,309,1141,2857,5145,6861,6861,5145,2857,1141,309,49,1,1,53,361,1453,4001,8005,12009,13725,12009,8005,4001,1453,361,53,1,1,57,417,1817,5457,12009,20017,25737,25737,20017,12009,5457,1817,417,57,1,1,61,477,2237,7277,17469,32029,45757,51477,45757,32029,17469,7277,2237,477,61,1,1,65,541,2717,9517,24749,49501,77789,97237,97237,77789,49501,24749,9517,2717,541,65,1,1,69,609,3261,12237,34269,74253,127293,175029,194477,175029,127293,74253,34269,12237,3261,609,69,1,1,73,681,3873,15501,46509,108525,201549,302325,369509,369509,302325,201549,108525,46509,15501,3873,681,73,1,1,77,757,4557,19377,62013,155037,310077,503877,671837,739021,671837,503877,310077,155037,62013,19377,4557,757,77,1,1,81,837,5317,23937,81393,217053,465117,813957,1175717,1410861,1410861,1175717,813957,465117,217053,81393,23937,5317 cal $0,206735 ; Triangle T(n,k), read by rows, given by (0, 2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. trn $0,1 mov $1,$0 mul $1,4 add $1,1
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca.log_21829_1679.asm
ljhsiun2/medusa
9
96674
<filename>Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca.log_21829_1679.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r14 push %r8 push %rcx push %rdi push %rsi lea addresses_D_ht+0x165f, %rsi lea addresses_WC_ht+0x46b7, %rdi dec %r10 mov $63, %rcx rep movsw nop nop nop nop add $60708, %r8 lea addresses_UC_ht+0xdda7, %r13 clflush (%r13) cmp $13160, %rdi mov (%r13), %ecx nop nop nop nop inc %rsi lea addresses_normal_ht+0x11177, %rsi lea addresses_normal_ht+0x1ac7b, %rdi clflush (%rdi) nop nop nop and %r12, %r12 mov $82, %rcx rep movsq nop nop nop nop dec %r8 lea addresses_UC_ht+0x11b37, %rsi lea addresses_D_ht+0xddb7, %rdi clflush (%rdi) sub %r14, %r14 mov $66, %rcx rep movsb inc %r8 lea addresses_WC_ht+0x156b7, %rsi lea addresses_WT_ht+0xacb7, %rdi cmp $49951, %r13 mov $124, %rcx rep movsq nop nop nop nop add $3173, %r12 lea addresses_WT_ht+0xab7, %r10 nop nop nop nop and %r12, %r12 movb (%r10), %cl nop nop nop nop sub %rcx, %rcx lea addresses_D_ht+0x156b7, %rdi nop nop nop xor $39268, %r14 movw $0x6162, (%rdi) add $56651, %rsi lea addresses_UC_ht+0x9237, %r10 and %r12, %r12 mov (%r10), %cx nop nop nop nop inc %rdi lea addresses_D_ht+0x6ab7, %r13 nop nop xor %r10, %r10 mov $0x6162636465666768, %rcx movq %rcx, (%r13) nop nop nop nop inc %r12 lea addresses_WT_ht+0x73b7, %r14 nop nop nop nop nop dec %rsi mov $0x6162636465666768, %r10 movq %r10, (%r14) and %r10, %r10 lea addresses_UC_ht+0x1d20d, %r12 nop nop nop xor $51497, %rsi mov $0x6162636465666768, %rcx movq %rcx, %xmm4 vmovups %ymm4, (%r12) nop nop nop nop nop xor $17685, %rsi lea addresses_D_ht+0x3927, %rsi lea addresses_normal_ht+0xa1ff, %rdi nop nop dec %r13 mov $117, %rcx rep movsb nop nop lfence lea addresses_WT_ht+0xd7df, %rdi nop sub %r8, %r8 movl $0x61626364, (%rdi) cmp %r13, %r13 lea addresses_UC_ht+0xdbb7, %rsi lea addresses_WC_ht+0xef53, %rdi inc %r10 mov $15, %rcx rep movsb nop inc %rdi pop %rsi pop %rdi pop %rcx pop %r8 pop %r14 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r9 push %rax push %rbp push %rcx push %rdi // Store lea addresses_PSE+0x2db7, %rdi nop nop nop dec %r11 mov $0x5152535455565758, %rcx movq %rcx, (%rdi) xor $57327, %r9 // Faulty Load lea addresses_US+0x1c2b7, %rax cmp %r15, %r15 vmovntdqa (%rax), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $1, %xmm4, %rdi lea oracles, %rbp and $0xff, %rdi shlq $12, %rdi mov (%rbp,%rdi,1), %rdi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 8}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 3}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 10}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}, 'dst': {'same': True, 'type': 'addresses_normal_ht', 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': True, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': True, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 2}} {'44': 19983, '00': 57, '46': 1789} 00 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 00 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 00 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 00 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 00 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 */
Transynther/x86/_processed/NC/_st_zr_sm_/i9-9900K_12_0xca_notsx.log_21829_1184.asm
ljhsiun2/medusa
9
100773
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x9819, %r11 nop nop add %rax, %rax vmovups (%r11), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r10 nop nop nop nop dec %r13 lea addresses_WT_ht+0xe1ad, %rax nop nop nop nop sub $25405, %rbp movw $0x6162, (%rax) nop nop nop add $42880, %rbp lea addresses_WT_ht+0x12dcd, %rbp nop inc %rbx mov (%rbp), %r11 nop nop nop nop nop inc %rax lea addresses_WC_ht+0x1156d, %rsi lea addresses_A_ht+0x1bacd, %rdi nop nop cmp $10045, %rbp mov $48, %rcx rep movsb nop inc %rdi lea addresses_A_ht+0x39cd, %rsi lea addresses_A_ht+0x1ddcd, %rdi clflush (%rdi) nop nop nop nop add %r13, %r13 mov $55, %rcx rep movsq nop nop nop nop nop xor %rax, %rax lea addresses_D_ht+0x1c3cd, %rsi nop lfence mov $0x6162636465666768, %rbx movq %rbx, %xmm3 movups %xmm3, (%rsi) nop nop nop nop sub %rbx, %rbx lea addresses_A_ht+0x6dcd, %rsi lea addresses_WC_ht+0xcb33, %rdi nop inc %r10 mov $119, %rcx rep movsq nop nop lfence pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r9 push %rbp push %rbx push %rcx // Store mov $0x1a139f00000005cd, %r13 nop dec %r11 mov $0x5152535455565758, %rbx movq %rbx, (%r13) cmp $45746, %r11 // Faulty Load mov $0x1a139f00000005cd, %r13 nop cmp $63156, %rbp mov (%r13), %r9w lea oracles, %rbx and $0xff, %r9 shlq $12, %r9 mov (%rbx,%r9,1), %r9 pop %rcx pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_A_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}, 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}} {'00': 19233, '58': 2596} 00 00 00 58 58 00 58 00 00 00 00 58 00 00 00 00 00 00 58 58 58 58 00 00 00 00 00 00 00 00 00 58 58 58 58 58 58 58 58 00 00 58 58 00 00 00 00 58 00 58 00 58 58 58 58 58 58 00 58 00 58 58 00 00 00 00 00 00 00 00 00 58 58 58 58 00 00 00 00 00 58 00 00 00 00 00 00 00 00 58 00 00 00 00 58 58 00 00 00 00 00 58 58 58 58 00 58 58 00 00 00 00 00 00 00 58 58 00 00 00 00 00 00 00 00 58 58 00 00 00 00 58 00 00 00 00 00 00 00 58 58 58 58 00 58 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 00 58 58 00 00 58 00 00 00 00 00 58 00 58 58 00 00 58 58 58 58 00 00 00 58 58 00 58 58 58 58 58 00 00 00 00 58 00 00 00 00 00 58 00 00 00 00 00 00 58 00 58 58 00 00 00 58 58 00 00 00 00 00 00 58 00 00 00 00 00 58 58 00 00 00 00 00 58 58 58 00 58 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 58 58 00 58 00 00 58 00 00 58 58 00 58 00 58 00 00 58 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 58 58 58 00 00 00 58 58 58 58 00 58 00 00 58 58 00 00 00 00 00 00 00 00 00 00 58 58 58 00 00 00 58 00 00 58 00 00 00 00 00 00 00 00 00 58 58 58 00 00 00 00 58 58 58 00 58 58 58 00 58 58 58 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 58 58 00 58 58 58 00 00 00 58 58 58 58 58 00 00 00 00 00 00 00 00 00 58 58 00 00 58 00 58 00 58 00 00 58 58 58 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
source/main/lace-run.adb
reznikmm/lace
0
28534
<reponame>reznikmm/lace -- SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Ada.Characters.Conversions; with Ada.Command_Line; with Ada.Text_IO; with Ada.Wide_Wide_Text_IO; with LLVM.Core; with Program.Compilations; with Program.Error_Listeners; with Program.Plain_Contexts; with Program.Storage_Pools.Instance; pragma Unreferenced (Program.Storage_Pools.Instance); with Lace.LLVM_Contexts; procedure Lace.Run is type Error_Listener is new Program.Error_Listeners.Error_Listener with null record; Ctx : aliased Program.Plain_Contexts.Context; Errors : aliased Error_Listener; Context : Lace.LLVM_Contexts.LLVM_Context; Done : Integer; begin Ada.Wide_Wide_Text_IO.Put_Line ("🎇 Hello!"); Ctx.Initialize (Errors'Unchecked_Access); for J in 1 .. Ada.Command_Line.Argument_Count loop declare Arg : constant Wide_Wide_String := Ada.Characters.Conversions.To_Wide_Wide_String (Ada.Command_Line.Argument (J)); begin if Arg'Length > 2 and then Arg (1 .. 2) = "-I" then Ctx.Add_Search_Directory (Arg (3 .. Arg'Last)); else Ctx.Parse_File (Arg); end if; end; end loop; Ctx.Complete_Analysis; Context.Context := LLVM.Core.Context_Create; Context.Builder := LLVM.Core.Create_Builder_In_Context (Context.Context); for Cursor in Ctx.Compilation_Unit_Bodies.Each_Unit loop Context.Module := LLVM.Core.Module_Create_With_Name_In_Context (Ada.Characters.Conversions.To_String (Cursor.Unit.Compilation.Text_Name), Context.Context); -- For each body calculate a dummy property Done. As side effect it will -- build LLVM representation in the Context.Module Done := Context.LLVM_Int.Get_Property (Cursor.Unit.Unit_Declaration, Lace.LLVM_Contexts.Done); Ada.Text_IO.Put ("; Done="); Ada.Text_IO.Put_Line (Done'Image); -- Output LLVM code: Ada.Text_IO.Put_Line (LLVM.Core.Print_Module_To_String (Context.Module)); end loop; end Lace.Run;
3-mid/impact/source/2d/orbs/collision/shapes/impact-d2-orbs-shape.adb
charlie5/lace
20
14686
<reponame>charlie5/lace with impact.d2.Math; package body impact.d2.orbs.Shape is function to_Circle (Radius : in float_math.Real) return Shape.item is begin return (m_radius => Radius); end to_Circle; function Clone (Self : in Item) return Shape.item is begin return Self; end Clone; function test_Point (Self : in Item; xf : in impact.d2.Math.b2Transform; p : in impact.d2.Math.b2Vec2 ) return Boolean is use impact.d2.Math; center : constant impact.d2.Math.b2Vec2 := xf.position; d : constant impact.d2.Math.b2Vec2 := p - center; begin return impact.d2.Math.b2Dot (d, d) <= Self.m_radius * Self.m_radius; end test_Point; -- Collision Detection in Interactive 3D Environments by <NAME> -- From Section 3.1.2 -- x = s + a * r -- norm(x) = radius -- function ray_Cast (Self : in Item; output : access collision.b2RayCastOutput; input : in collision.b2RayCastInput; transform : in impact.d2.Math.b2Transform ) return Boolean is use float_math.Functions, impact.d2.Math; position : constant impact.d2.Math.b2Vec2 := transform.position; s : constant impact.d2.Math.b2Vec2 := input.p1 - position; b : constant float32 := impact.d2.Math.b2Dot (s, s) - Self.m_radius * Self.m_radius; -- Solve quadratic equation. r : constant b2Vec2 := input.p2 - input.p1; c : constant float32 := impact.d2.Math.b2Dot (s, r); rr : float32 := b2Dot (r, r); sigma : constant float32 := c * c - rr * b; a : float32; begin if sigma < 0.0 or else rr < b2_epsilon then -- Check for negative discriminant and short segment. return False; end if; a := -(c + SqRt (sigma)); -- Find the point of intersection of the line with the circle. if 0.0 <= a and then a <= input.maxFraction * rr then -- Is the intersection point on the segment? a := a / rr; output.fraction := a; output.normal := s + a * r; impact.d2.Math.Normalize (output.normal); return True; end if; return False; end ray_Cast; procedure compute_AABB (Self : in Item; aabb : access collision.b2AABB; xf : in impact.d2.Math.b2Transform) is use impact.d2.Math; p : b2Vec2 := xf.position; begin aabb.lowerBound := (p.x - Self.m_radius, p.y - Self.m_radius); aabb.upperBound := (p.x + Self.m_radius, p.y + Self.m_radius); end compute_AABB; procedure compute_Mass (Self : in Item; massData : access mass_Data; density : in float32) is Radius_squared : constant float32 := Self.m_radius * Self.m_radius; begin massData.mass := density * b2_pi * Radius_squared; massData.center := (0.0, 0.0); -- inertia about the local origin massData.I := massData.mass * (0.5 * Radius_squared); end compute_Mass; function get_Support (Self : in Item; d : in impact.d2.Math.b2Vec2) return int32 is pragma Unreferenced (d, Self); begin return 0; end get_Support; function get_support_Vertex (Self : in Item; d : in impact.d2.Math.b2Vec2) return impact.d2.Math.b2Vec2 is pragma Unreferenced (d, Self); begin return (0.0, 0.0); end get_support_Vertex; function get_vertex_Count (Self : in Item ) return int32 is pragma Unreferenced (Self); begin return 1; end get_vertex_Count; function get_Vertex (Self : in Item; index : in int32) return impact.d2.Math.b2Vec2 is pragma Unreferenced (Self); use type int32; begin pragma Assert (index = 0); return (0.0, 0.0); -- Self.m_p; end get_Vertex; end impact.d2.orbs.Shape;
LoopStatement.asm
akshithsriram/Hack-Computer
0
245361
// Implementation of a Loop Statement in the Hack Machine Language // Calculates the sum of all numbers in the sequence [start, stop] with step size 'inc' // sum = start + (start + inc) + (start + 2*inc) + .. (till end is reached) // e.g. start = 1, inc = 2 calculates the sum 1 + 3 + 5 + ... + 99 // Equivalent C program: // i = start // sum = 0 // while(i <= end) // { // sum = sum + i; // i = i + inc; // } @start // Memory Location 16 D = M // D <-- start @i // Memory Location 17 M = D // i <-- D = start @inc // Memory Location 18 @end // Memory Location 19 @sum // Memory Location 20 M = 0 // sum <-- 0 (LOOP) @i D = M // D <-- i @end D = D - M // D <-- i - end @END D;JGT // Exit the loop if (i - end) > 0 @i D = M // D = i @sum M = D + M // sum <-- sum + i @inc D = M @i M = M + D // i = i + inc @LOOP 0;JMP // Repeat the instructions of LOOP (END) @END 0;JMP // Infinite loop, program termination
src/sys/encoders/util-encoders-sha256.ads
RREE/ada-util
60
25318
----------------------------------------------------------------------- -- util-encoders-sha256 -- Compute SHA-256 hash -- Copyright (C) 2017, 2018, 2019 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Streams; with GNAT.SHA256; package Util.Encoders.SHA256 is HASH_SIZE : constant := 32; -- The SHA-256 binary hash (256-bit). subtype Hash_Array is Ada.Streams.Stream_Element_Array (0 .. HASH_SIZE - 1); -- The SHA-256 hash as hexadecimal string. subtype Digest is String (1 .. 2 * HASH_SIZE); subtype Base64_Digest is String (1 .. 44); -- ------------------------------ -- SHA256 Context -- ------------------------------ subtype Context is GNAT.SHA256.Context; -- Update the hash with the string. procedure Update (E : in out Context; S : in String) renames GNAT.SHA256.Update; -- Update the hash with the string. procedure Update (E : in out Context; S : in Ada.Streams.Stream_Element_Array) renames GNAT.SHA256.Update; -- Computes the SHA256 hash and returns the raw binary hash in <b>Hash</b>. procedure Finish (E : in out Context; Hash : out Hash_Array); -- Computes the SHA256 hash and returns the hexadecimal hash in <b>Hash</b>. procedure Finish (E : in out Context; Hash : out Digest); -- Computes the SHA256 hash and returns the base64 hash in <b>Hash</b>. procedure Finish_Base64 (E : in out Context; Hash : out Base64_Digest); end Util.Encoders.SHA256;
workshop/tests/src/shared.ads
TNO/Rejuvenation-Ada
1
28517
<gh_stars>1-10 with Libadalang.Analysis; use Libadalang.Analysis; package Shared is function Nr_Of_Parameters (S_S : Subp_Spec) return Integer; function Is_Part_Of_Subp_Def (S_S : Subp_Spec) return Boolean; function Inside_Private_Part (Node : Ada_Node'Class) return Boolean; end Shared;
ada/client/src/lmcp-client.adb
joffreyhuguet/LmcpGen
0
18148
with Ada.Text_IO; use Ada.Text_IO; with ZMQ.Sockets; with ZMQ.Contexts; with ZMQ.Messages; procedure LMCP.Client is Ctx : ZMQ.Contexts.Context; Sub : ZMQ.Sockets.Socket; begin Ctx.Set_number_of_IO_threads (1); Sub.Initialize (Ctx, ZMQ.Sockets.SUB); -- LmcpObjectNetworkPublishPullBridge -- 'AddressPUB' attribute specifies PUB address (defaults to 'tcp://*:5556') -- PUB socket is zeromq server (i.e. binds) Sub.Connect ("tcp://127.0.0.1:5556"); -- Accept all forwarded messages (filtering on PUB side via 'SubscribeToMessage' child elements) Sub.Establish_Message_Filter (""); for i in 1 .. 10 loop declare ZmqMsg : ZMQ.Messages.Message; begin ZmqMsg.Initialize (0); Sub.Recv (ZmqMsg); Put_Line (ZmqMsg.GetData); -- ZMQ.Messages.Message is finalized automatically as controlled types (i.e. ensures -- call to underlying zmq_msg_close() via its Finalize subprogram) end; end loop; -- Socket is closed (i.e. zmq_close()) automatically via Finalize as a controlled type end LMCP.Client;
programs/oeis/300/A300659.asm
neoneye/loda
22
1652
; A300659: Product of digits of n!. ; 1,1,2,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 pow $0,2 div $0,2 mov $2,$0 mov $0,6 sub $2,5 div $0,$2 sub $1,$0 add $1,10 mod $1,10 mov $0,$1
04-cubical-type-theory/material/Part3.agda
williamdemeo/EPIT-2020
1
11965
<reponame>williamdemeo/EPIT-2020 {- Part 3: Univalence and the SIP • Univalence from ua and uaβ • Transporting with ua • The SIP as a consequence of ua -} {-# OPTIONS --cubical #-} module Part3 where open import Cubical.Core.Glue public using ( Glue ; glue ; unglue ; lineToEquiv ) open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Part1 open import Part2 -- A key concept in HoTT/UF is univalence. As we have seen earlier in -- the week this is assumed as an axiom in HoTT. In Cubical Agda it is -- instead provable and has computational content. This means that -- transporting with paths constructed using univalence reduces as -- opposed to HoTT where they would be stuck. This simplifies some -- proofs and make it possible to actually do concrete computations -- using univalence. -- The part of univalence which is most useful for our applications is -- to be able to turn equivalences (written _≃_ and defined as a Σ-type -- of a function and a proof that it has contractible fibers) into -- paths: ua : {A B : Type ℓ} → A ≃ B → A ≡ B ua {A = A} {B = B} e i = Glue B (λ { (i = i0) → (A , e) ; (i = i1) → (B , idEquiv B) }) -- This term is defined using "Glue types" which were introduced in -- the CCHM paper. We won't have time to go into details about them -- today, but for practical applications one can usually forget about -- them and use ua as a black box. There are multiple useful lemmas in -- Cubical.Foundations.Univalence and Cubical.Foundations.Transport -- which are helpful when reasoning about ua which don't require -- knowing what Glue types are. -- The important point is that transporting along the path constructed -- using ua applies the function underlying the equivalence. This is -- easily proved using transportRefl: uaβ : (e : A ≃ B) (x : A) → transport (ua e) x ≡ fst e x uaβ e x = transportRefl (equivFun e x) -- Note that for concrete types this typically hold definitionally, -- but for an arbitrary equivalence e we have to prove it. -- The fact that we have both ua and uaβ suffices to be able to prove -- the standard formulation of univalence. For details see: -- -- Cubical.Foundations.Univalence -- The standard way of constructing equivalences is to start with an -- isomorphism and then improve it into an equivalence. The lemma in -- the library which does this is -- -- isoToEquiv : {A B : Type ℓ} → Iso A B → A ≃ B -- Composing this with ua lets us directly turn isomorphisms into paths: -- -- isoToPath : {A B : Type ℓ} → Iso A B → A ≡ B -- Time for an example! -- Booleans data Bool : Type₀ where false true : Bool not : Bool → Bool not false = true not true = false notPath : Bool ≡ Bool notPath = isoToPath (iso not not rem rem) where rem : (b : Bool) → not (not b) ≡ b rem false = refl rem true = refl _ : transport notPath true ≡ false _ = refl -- Another example, integers: open import Cubical.Data.Int hiding (_+_ ; +-assoc) sucPath : Int ≡ Int sucPath = isoToPath (iso sucInt predInt sucPred predSuc) _ : transport sucPath (pos 0) ≡ pos 1 _ = refl _ : transport (sucPath ∙ sucPath) (pos 0) ≡ pos 2 _ = refl _ : transport (sym sucPath) (pos 0) ≡ negsuc 0 _ = refl ------------------------------------------------------------------------- -- The structure identity principle -- Combining subst and ua lets us transport any structure on A to get -- a structure on an equivalent type B substEquiv : (S : Type ℓ → Type ℓ') (e : A ≃ B) → S A → S B substEquiv S e = subst S (ua e) -- Example with binary numbers: open import Cubical.Data.BinNat.BinNat renaming (ℕ≃binnat to ℕ≃Bin ; binnat to Bin) open import Cubical.Data.Nat T : Set → Set T X = Σ[ _+_ ∈ (X → X → X) ] ((x y z : X) → x + (y + z) ≡ (x + y) + z) TBin : T Bin TBin = substEquiv T ℕ≃Bin (_+_ , +-assoc) _+Bin_ : Bin → Bin → Bin _+Bin_ = fst TBin +Bin-assoc : (m n o : Bin) → m +Bin (n +Bin o) ≡ (m +Bin n) +Bin o +Bin-assoc = snd TBin -- This is however not always what we want as _+Bin_ will translate -- its input to unary numbers, add, and then translate back. Instead -- we want to use efficient addition on binary numbers, but get the -- associativity proof for free. So what we really want is to -- characterize the equality of T-structured types, i.e. we want a -- proof that two types equipped with T-structures are equal if there -- is a T-structure preserving equivalence between them. This is the -- usual meaning of the *structure identity principle* (SIP). This -- implies in particular that the type of paths of -- monoids/groups/rings/R-modules/... is equivalent to the type of -- monoid/group/ring/R-module/... preserving equivalences. -- We formalize this and much more using a cubical version of the SIP in: -- -- Internalizing Representation Independence with Univalence -- <NAME>, <NAME>, <NAME>, <NAME> -- https://arxiv.org/abs/2009.05547 -- -- The binary numbers example with efficient addition is spelled out -- in detail in Section 2.1.1 of: -- -- https://www.doi.org/10.1017/S0956796821000034 -- (Can be downloaded from: https://staff.math.su.se/anders.mortberg/papers/cubicalagda2.pdf)
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/lto9.adb
best08618/asylo
7
5785
-- { dg-do run } -- { dg-options "-flto" { target lto } } with Lto9_Pkg1; use Lto9_Pkg1; procedure Lto9 is begin District_Subscription_Lists.Put (List => District_01_Subscribers, Elem_Ptr => New_Subscriber_01'Access, Location => 1); end;
parser/src/main/antlr/com/github/bjansen/pebble/parser/PebbleLexer.g4
froth/pebble-intellij
0
6667
<filename>parser/src/main/antlr/com/github/bjansen/pebble/parser/PebbleLexer.g4 lexer grammar PebbleLexer; @members { private java.util.Queue<Token> queue = new java.util.LinkedList<Token>(); private boolean inStringInterpolation = false; private int openingBracesCount = 0; protected Token customNextToken() { return super.nextToken(); } @Override public Token nextToken() { if (!queue.isEmpty()) { return queue.poll(); } Token next = customNextToken(); if (next.getType() != CONTENT) { return next; } StringBuilder builder = new StringBuilder(); Token startToken = next; while (next.getType() == CONTENT) { builder.append(next.getText()); next = customNextToken(); } // The `next` will _not_ be a CONTENT-token, store it in // the queue to return the next time! queue.offer(next); CommonToken token = new CommonToken(startToken); token.setStopIndex(startToken.getStartIndex() + builder.length() - 1); return token; } @Override public void setInputStream(IntStream input) { queue.clear(); super.setInputStream(input); } } PRINT_OPEN : ('{{-' | '{{') -> pushMode(IN_TAG) ; COMMENT : '{#' .*? '#}' ; VERBATIM_TAG_OPEN : '{%' [ \t]* 'verbatim' [ \t]* '%}' -> pushMode(VERBATIM) ; TAG_OPEN : ('{%-' |'{%') -> pushMode(IN_TAG) ; CONTENT : . ; mode VERBATIM; VERBATIM_TAG_END : ('{%' [ \t]* 'endverbatim' [ \t]* '%}') -> popMode ; VERBATIM_BODY : . -> type(CONTENT) ; mode IN_TAG; TAG_CLOSE : ('-%}' | '%}') -> popMode ; PRINT_CLOSE : ('-}}' | ('}}' {openingBracesCount == 0 && !inStringInterpolation}?)) -> popMode ; // "hard" keywords, can never be legal identifiers AND : 'and' ; CONTAINS : 'contains' ; EQUALS : 'equals' ; IS : 'is' ; NOT : 'not' ; OR : 'or' ; // "soft" keywords, can be legal identifiers under certains circumstances AS : 'as' ; FROM : 'from' ; IN : 'in' ; IMPORT : 'import' ; WITH : 'with' ; // reserved keywords, can be legal identifiers under certains circumstances TRUE : 'true' ; FALSE : 'false' ; NULL : 'null' ; NONE : 'none' ; // Others OP_ASSIGN : '=' ; OP_TERNARY : '?' ; OP_COLON : ':' ; OP_PIPE : '|' ; OP_CONCAT : '~' ; OP_RANGE : '..' ; OP_MEMBER : '.' ; LBRACE : '{' { if (inStringInterpolation) { openingBracesCount++; } } ; RBRACE : '}' { if (inStringInterpolation) { if (openingBracesCount > 0) { // We are probably closing a map expression or something similar openingBracesCount--; } else { // We are closing the string interpolation inStringInterpolation = false; setType(INTERPOLATED_STRING_STOP); popMode(); } } } ; LBRACKET : '[' ; RBRACKET : ']' ; LPAREN : '(' ; RPAREN : ')' ; COMMA : ',' ; OP_PLUS : '+' ; OP_MINUS : '-' ; OP_DIV : '/' ; OP_MULT : '*' ; OP_MOD : '%' ; OP_EQ : '==' ; OP_NEQ : '!=' ; OP_LE : '<=' ; OP_LT : '<' ; OP_GE : '>=' ; OP_GT : '>' ; STRING_START : '"' -> pushMode(IN_STRING) ; SINGLE_QUOTED_STRING : '\'' ~[']* '\''? ; LONG : [0-9]+ 'l' ; NUMERIC : [0-9]+(.[0-9]+)? ; ID_NAME : [a-zA-Z_][_0-9a-zA-Z]* ; WHITESPACE : [ \t\n\r]+ -> channel(HIDDEN) ; ERRCHAR2 : . -> channel(HIDDEN) ; mode IN_STRING; STRING_END : '"' -> popMode ; INTERPOLATED_STRING_START : '#{' {inStringInterpolation = true;} -> pushMode(IN_TAG) ; TEXT : (~["#] | ('#' {_input.LA(1) != '{'}?))+ ; INTERPOLATED_STRING_STOP : '}' ;
src/osascripts/file-mode-operations.applescript
jokajak/ki
83
3953
<reponame>jokajak/ki<filename>src/osascripts/file-mode-operations.applescript -- AppleScript template for various file mode operations -- `operation` - the operation name -- `filePath1` - a string path to a file that will operated on -- `filePath2` - a secondary string file path necessary for some operations set operation to "{{{operation}}}" set filePath1 to "{{{filePath1}}}" set filePath2 to "{{{filePath2}}}" tell application "Finder" if operation is "open-with" then open file (filePath1 as POSIX file) using (filePath2 as POSIX file) else if operation is "open-info-window" then set targetFile to (POSIX file filePath1) as alias set infoWindow to information window of targetFile open infoWindow activate else if operation is "move-to-trash" then delete (filePath1 as POSIX file) else if operation is "move" then move (filePath1 as POSIX file) to (filePath2 as POSIX file) else if operation is "copy" then duplicate POSIX file filePath1 as alias to POSIX file filePath2 as alias end if end tell
uuids-version_1-throttled_ts.adb
annexi-strayline/ASAP-UUIDs
0
16926
<filename>uuids-version_1-throttled_ts.adb ------------------------------------------------------------------------------ -- -- -- Common UUID Handling Package -- -- - RFC 4122 Implementation - -- -- -- -- Version 1.0 -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Version 1 (Time-based) UUID Generation Package -- -- Throttled Timestamp Source Package -- -- for high performance generation -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2018, ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * <NAME> (ANNEXI-STRAYLINE) -- -- -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- -- -- * Neither the name of ANNEXI-STRAYLINE nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANNEXI-STRAYLINE -- -- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -- -- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- -- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -- -- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -- -- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package body UUIDs.Version_1.Throttled_TS is ----------------------- -- Current_Timestamp -- ----------------------- protected body Current_Timestamp is function Get return Timestamp is (TS); procedure Set (New_TS: in Timestamp) is begin TS := New_TS; end Set; end Current_Timestamp; ----------------------- -- Timestamp_Monitor -- ----------------------- task body Timestamp_Monitor is Alive: Boolean := True; TS : Timestamp; begin while Alive loop select accept Kill do Alive := False; end Kill; or delay Update_Quantum; TS := Actual_Source; Current_Timestamp.Set (TS); end select; end loop; end Timestamp_Monitor; end UUIDs.Version_1.Throttled_TS;
data/pokemon/dex_entries/munchlax.asm
AtmaBuster/pokeplat-gen2
6
13405
db "BIG EATER@" ; species name db "It conceals food" next "under the long fur" next "on its body. It" page "carts around this" next "food stash and" next "swallows it whole.@"
pmap.adb
M1nified/Ada-Samples
0
3148
<filename>pmap.adb with Ada.Text_Io; use Ada.Text_Io; package body PMap is task body pmap_apply is value : Integer; Func : func_type; begin accept PortIn(ValIn : in Integer; FuncIn : in not null func_type) do value := ValIn; Func := FuncIn; end PortIn; value := Func(value); Put_Line(Integer'Image(value)); accept PortOut(ValOut : out Integer) do ValOut := value; end PortOut; end pmap_apply; task body pmap_task is List, List_modified : vector_ptr; Func : func_type; Kids : pmap_applies_access; val : Integer; begin accept PortIn(ValIn : in vector_ptr; FuncIn : in not null func_type) do List := ValIn; Func := FuncIn; end PortIn; --Put_Line(Integer'Image(List'Length)); List_modified := new vector(List'range); Kids := new pmap_applies(List'range); for i in List'range loop Kids(i).PortIn(List(i), Func); end loop; for i in List'range loop Kids(i).PortOut(val); List_modified(i) := val; --Put_Line(Integer'Image(val)); end loop; accept PortOut(ValOut : out vector_ptr) do ValOut := List_modified; end PortOut; end pmap_task; function example1 (X : in Integer) return Integer is begin return x + 10; end example1; function pmap (List : in vector_ptr) return vector_ptr is task1 : pmap_task; output : vector_ptr; begin task1.PortIn(List, example1'Access); task1.PortOut(output); return(output); end pmap; end PMap;
host/stm32gd-gpio-polled.adb
ekoeppen/STM32_Generic_Ada_Drivers
1
28215
<filename>host/stm32gd-gpio-polled.adb package body STM32GD.GPIO.Polled is T : Boolean; procedure Wait_For_Trigger is begin while Pin.Is_Set loop null; end loop; T := True; end Wait_For_Trigger; procedure Clear_Trigger is begin T := False; end Clear_Trigger; function Triggered return Boolean is begin return T; end Triggered; procedure Cancel_Wait is begin null; end Cancel_Wait; procedure Configure_Trigger (Event : Boolean := False; Rising : Boolean := False; Falling : Boolean := False) is begin null; end Configure_Trigger; end STM32GD.GPIO.Polled;
src/Stack.agda
mietek/imla2017
17
3205
module Stack where open import Prelude public -- Stacks, or snoc-lists. data Stack (X : Set) : Set where ∅ : Stack X _,_ : Stack X → X → Stack X -- Stack membership, or de Bruijn indices. module _ {X : Set} where infix 3 _∈_ data _∈_ (A : X) : Stack X → Set where top : ∀ {Γ} → A ∈ Γ , A pop : ∀ {Γ B} → A ∈ Γ → A ∈ Γ , B ⌊_⌋∈ : ∀ {Γ A} → A ∈ Γ → Nat ⌊ top ⌋∈ = zero ⌊ pop i ⌋∈ = suc ⌊ i ⌋∈ i₀ : ∀ {Γ A} → A ∈ Γ , A i₀ = top i₁ : ∀ {Γ A B} → A ∈ Γ , A , B i₁ = pop i₀ i₂ : ∀ {Γ A B C} → A ∈ Γ , A , B , C i₂ = pop i₁ -- Stack inclusion, or order-preserving embeddings. module _ {X : Set} where infix 3 _⊆_ data _⊆_ : Stack X → Stack X → Set where bot : ∀ {Γ} → ∅ ⊆ Γ skip : ∀ {Γ Γ′ A} → Γ ⊆ Γ′ → Γ ⊆ Γ′ , A keep : ∀ {Γ Γ′ A} → Γ ⊆ Γ′ → Γ , A ⊆ Γ′ , A refl⊆ : ∀ {Γ} → Γ ⊆ Γ refl⊆ {∅} = bot refl⊆ {Γ , A} = keep refl⊆ trans⊆ : ∀ {Γ Γ′ Γ″} → Γ ⊆ Γ′ → Γ′ ⊆ Γ″ → Γ ⊆ Γ″ trans⊆ bot η′ = bot trans⊆ η (skip η′) = skip (trans⊆ η η′) trans⊆ (skip η) (keep η′) = skip (trans⊆ η η′) trans⊆ (keep η) (keep η′) = keep (trans⊆ η η′) weak⊆ : ∀ {Γ A} → Γ ⊆ Γ , A weak⊆ = skip refl⊆ -- Monotonicity of stack membership with respect to stack inclusion. module _ {X : Set} where mono∈ : ∀ {Γ Γ′ : Stack X} {A} → Γ ⊆ Γ′ → A ∈ Γ → A ∈ Γ′ mono∈ bot () mono∈ (skip η) i = pop (mono∈ η i) mono∈ (keep η) top = top mono∈ (keep η) (pop i) = pop (mono∈ η i) -- Pairs of stacks. infixl 4 _⁏_ record Stack² (X Y : Set) : Set where constructor _⁏_ field π₁ : Stack X π₂ : Stack Y open Stack² public -- Stack pair inclusion. module _ {X Y : Set} where infix 3 _⊆²_ _⊆²_ : Stack² X Y → Stack² X Y → Set Γ ⁏ Δ ⊆² Γ′ ⁏ Δ′ = Γ ⊆ Γ′ ∧ Δ ⊆ Δ′ refl⊆² : ∀ {Γ Δ} → Γ ⁏ Δ ⊆² Γ ⁏ Δ refl⊆² = refl⊆ , refl⊆ trans⊆² : ∀ {Γ Γ′ Γ″ Δ Δ′ Δ″} → Γ ⁏ Δ ⊆² Γ′ ⁏ Δ′ → Γ′ ⁏ Δ′ ⊆² Γ″ ⁏ Δ″ → Γ ⁏ Δ ⊆² Γ″ ⁏ Δ″ trans⊆² (η , ρ) (η′ , ρ′) = trans⊆ η η′ , trans⊆ ρ ρ′
base/addressing/assembly.asm
imsouza/low-level-programming
0
81691
<filename>base/addressing/assembly.asm bits 64 global assembly assembly: mov rbx, 5 mov rcx, 10 lea eax, [rcx + rbx*2 + 5] ret
engine/battle/move_effects/sketch.asm
genterz/pokecross
28
11294
BattleCommand_Sketch: ; sketch call ClearLastMove ; Don't sketch during a link battle ld a, [wLinkMode] and a jr z, .not_linked call AnimateFailedMove jp PrintNothingHappened .not_linked ; If the opponent has a substitute up, fail. call CheckSubstituteOpp jp nz, .fail ; If the opponent is transformed, fail. ld a, BATTLE_VARS_SUBSTATUS5_OPP call GetBattleVarAddr bit SUBSTATUS_TRANSFORMED, [hl] jp nz, .fail ; Get the user's moveset in its party struct. ; This move replacement shall be permanent. ; Pointer will be in de. ld a, MON_MOVES call UserPartyAttr ld d, h ld e, l ; Get the battle move structs. ld hl, wBattleMonMoves ldh a, [hBattleTurn] and a jr z, .get_last_move ld hl, wEnemyMonMoves .get_last_move ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP call GetBattleVar ld [wNamedObjectIndexBuffer], a ld b, a ; Fail if move is invalid or is Struggle. and a jr z, .fail cp STRUGGLE jr z, .fail ; Fail if user already knows that move ld c, NUM_MOVES .does_user_already_know_move ld a, [hli] cp b jr z, .fail dec c jr nz, .does_user_already_know_move ; Find Sketch in the user's moveset. ; Pointer in hl, and index in c. dec hl ld c, NUM_MOVES .find_sketch dec c ld a, [hld] cp SKETCH jr nz, .find_sketch inc hl ; The Sketched move is loaded to that slot. ld a, b ld [hl], a ; Copy the base PP from that move. push bc push hl dec a ld hl, Moves + MOVE_PP call GetMoveAttr pop hl ld bc, wBattleMonPP - wBattleMonMoves add hl, bc ld [hl], a pop bc ldh a, [hBattleTurn] and a jr z, .user_trainer ld a, [wBattleMode] dec a jr nz, .user_trainer ; wildmon ld a, [hl] push bc ld hl, wWildMonPP ld b, 0 add hl, bc ld [hl], a ld hl, wWildMonMoves add hl, bc pop bc ld [hl], b jr .done_copy .user_trainer ld a, [hl] push af ld l, c ld h, 0 add hl, de ld a, b ld [hl], a pop af ld de, MON_PP - MON_MOVES add hl, de ld [hl], a .done_copy call GetMoveName call AnimateCurrentMove ld hl, SketchedText jp StdBattleTextbox .fail call AnimateFailedMove jp PrintDidntAffect
programs/oeis/244/A244633.asm
neoneye/loda
22
172985
<gh_stars>10-100 ; A244633: a(n) = 26*n^2. ; 0,26,104,234,416,650,936,1274,1664,2106,2600,3146,3744,4394,5096,5850,6656,7514,8424,9386,10400,11466,12584,13754,14976,16250,17576,18954,20384,21866,23400,24986,26624,28314,30056,31850,33696,35594,37544,39546,41600,43706,45864,48074,50336,52650,55016,57434,59904,62426,65000,67626,70304,73034,75816,78650,81536,84474,87464,90506,93600,96746,99944,103194,106496,109850,113256,116714,120224,123786,127400,131066,134784,138554,142376,146250,150176,154154,158184,162266,166400,170586,174824,179114,183456,187850,192296,196794,201344,205946,210600,215306,220064,224874,229736,234650,239616,244634,249704,254826 pow $0,2 mul $0,26
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_590.asm
ljhsiun2/medusa
9
13243
<filename>Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_590.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %rax push %rbx push %rcx push %rdx lea addresses_UC_ht+0x1b976, %rax xor %rbx, %rbx mov $0x6162636465666768, %r10 movq %r10, %xmm7 and $0xffffffffffffffc0, %rax movntdq %xmm7, (%rax) nop nop nop and %rcx, %rcx lea addresses_UC_ht+0x14113, %r11 nop add %rbx, %rbx vmovups (%r11), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %rdx nop nop sub %r11, %r11 pop %rdx pop %rcx pop %rbx pop %rax pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %rbx push %rdi // Store lea addresses_UC+0x8993, %r15 nop and %rdi, %rdi mov $0x5152535455565758, %rbx movq %rbx, %xmm2 movups %xmm2, (%r15) nop nop nop nop add %rdi, %rdi // Faulty Load mov $0x41b4b00000000e13, %r13 nop xor $4337, %rdi movb (%r13), %r15b lea oracles, %r13 and $0xff, %r15 shlq $12, %r15 mov (%r13,%r15,1), %r15 pop %rdi pop %rbx pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 5}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 16, 'NT': True, 'type': 'addresses_UC_ht', 'same': True, 'AVXalign': False, 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
programs/oeis/010/A010385.asm
neoneye/loda
22
103339
; A010385: Squares mod 23. ; 0,1,2,3,4,6,8,9,12,13,16,18 mov $3,$0 add $3,1 mov $7,$0 lpb $3 mov $0,$7 sub $3,1 sub $0,$3 mov $9,2 mov $10,0 mov $11,$0 lpb $9 mov $0,$11 mov $4,0 sub $9,1 add $0,$9 sub $0,1 mul $0,2 sub $0,4 lpb $0 add $2,$0 sub $0,1 trn $0,4 add $2,1 add $4,$2 mov $2,11 lpe mov $5,$2 cmp $5,0 add $2,$5 div $4,$2 mov $0,$4 mov $8,$9 mul $8,$4 add $10,$8 lpe min $11,1 mul $11,$0 mov $0,$10 sub $0,$11 add $0,1 add $6,$0 lpe mov $0,$6 sub $0,1
language/src/main/antlr4/com/guillermomolina/lazylanguage/parser/LazyLanguageLexer.g4
guillermomolina/lazylanguage
0
5777
lexer grammar LazyLanguageLexer; BREAK: 'break'; CONTINUE: 'continue'; DEBUGGER: 'debugger'; ELSE: 'else'; FUNCTION: 'function'; IF: 'if'; RETURN: 'return'; WHILE: 'while'; LPAREN: '('; RPAREN: ')'; LBRACK: '['; RBRACK: ']'; LCURLY: '{'; RCURLY: '}'; COMMA: ','; DOT: '.'; COLON: ':'; SEMI: ';'; OR: '||'; AND: '&&'; LT: '<'; LE: '<='; GT: '>'; GE: '>='; EQUAL: '=='; NOT_EQUAL: '!='; ADD: '+'; SUB: '-'; MUL: '*'; DIV: '/'; BITAND: '&'; BITOR: '|'; ASSIGN: '='; WS: [ \t\r\n\u000C]+ -> skip; COMMENT: '/*' .*? '*/' -> skip; LINE_COMMENT: '//' ~[\r\n]* -> skip; fragment LETTER: [A-Z] | [a-z] | '_' | '$'; fragment NON_ZERO_DIGIT: [1-9]; fragment DIGIT: [0-9]; fragment HEX_DIGIT: [0-9] | [a-f] | [A-F]; fragment OCT_DIGIT: [0-7]; fragment BINARY_DIGIT: '0' | '1'; fragment TAB: '\t'; fragment STRING_CHAR: ~('"' | '\\' | '\r' | '\n'); IDENTIFIER: LETTER (LETTER | DIGIT)*; STRING_LITERAL: '"' STRING_CHAR* '"'; NUMERIC_LITERAL: '0' | NON_ZERO_DIGIT DIGIT*;
Structure/Operator/Ring/Homomorphism.agda
Lolirofle/stuff-in-agda
6
15395
module Structure.Operator.Ring.Homomorphism where import Lvl open import Logic open import Logic.Predicate open import Structure.Function open import Structure.Function.Multi open import Structure.Setoid open import Structure.Operator.Ring open import Type record Homomorphism {ℓ₁ ℓ₂ ℓₑ₁ ℓₑ₂} {X : Type{ℓ₁}} ⦃ _ : Equiv{ℓₑ₁}(X) ⦄ {_+X_ _⋅X_ : X → X → X} (structureₗ : Ring(_+X_)(_⋅X_)) {Y : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(Y) ⦄ {_+Y_ _⋅Y_ : Y → Y → Y} (structureᵣ : Ring(_+Y_)(_⋅Y_)) (f : X → Y) : Stmt{ℓ₁ Lvl.⊔ ℓₑ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓₑ₂} where constructor intro 𝟏ₗ = Ring.𝟏(structureₗ) 𝟏ᵣ = Ring.𝟏(structureᵣ) field ⦃ function ⦄ : Function(f) ⦃ preserve-[+] ⦄ : Preserving₂(f)(_+X_)(_+Y_) ⦃ preserve-[⋅] ⦄ : Preserving₂(f)(_⋅X_)(_⋅Y_) ⦃ preserve-𝟏 ⦄ : Preserving₀(f)(𝟏ₗ)(𝟏ᵣ) record Antihomomorphism {ℓ₁ ℓ₂ ℓₑ₁ ℓₑ₂} {X : Type{ℓ₁}} ⦃ _ : Equiv{ℓₑ₁}(X) ⦄ {_+X_ _⋅X_ : X → X → X} (structureₗ : Ring(_+X_)(_⋅X_)) {Y : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(Y) ⦄ {_+Y_ _⋅Y_ : Y → Y → Y} (structureᵣ : Ring(_+Y_)(_⋅Y_)) (f : X → Y) : Stmt{ℓ₁ Lvl.⊔ ℓₑ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓₑ₂} where constructor intro 𝟏ₗ = Ring.𝟏(structureₗ) 𝟏ᵣ = Ring.𝟏(structureᵣ) field ⦃ function ⦄ : Function(f) ⦃ preserve-[+] ⦄ : Preserving₂(f)(_+X_)(_+Y_) ⦃ antipreserve-[⋅] ⦄ : ∀{x y} → (f(x ⋅X y) ≡ f(y) ⋅Y f(x)) ⦃ preserve-𝟏 ⦄ : Preserving₀(f)(𝟏ₗ)(𝟏ᵣ) _→ʳⁱⁿᵍ_ : ∀{ℓₗ ℓₗₑ ℓᵣ ℓᵣₑ} → RingObject{ℓₗ}{ℓₗₑ} → RingObject{ℓᵣ}{ℓᵣₑ} → Type A →ʳⁱⁿᵍ B = ∃(Homomorphism(RingObject.ring A)(RingObject.ring B))
04 - Machine Language/Mult.asm
AmrDeveloper/Nand2Tetris
2
19728
<filename>04 - Machine Language/Mult.asm // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by <NAME> Schocken, MIT Press. // File name: projects/04/Mult.asm // Multiplies R0 and R1 and stores the result in R2. // (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.) @R2 M=0 //Result = 0 @R0 //A D=M //i = A @i M=D (LOOP) @i D=M @END D;JEQ //End Loop if i = 0 @R1 D=M //B @R2 //result = A + B M=M+D @i M=M-1 //i-- @LOOP 0;JMP (END) @END 0;JMP
Type/Properties/Singleton.agda
Lolirofle/stuff-in-agda
6
10457
<filename>Type/Properties/Singleton.agda module Type.Properties.Singleton {ℓ ℓₑ} where import Lvl open import Lang.Instance open import Structure.Setoid open import Type -- A type is a singleton type when it has exactly one inhabitant (there is only one object with this type). -- In other words: There is an unique inhabitant of type T. -- Also called: -- • "singleton type" -- • "unit type" -- • "contractible" record IsUnit (T : Type{ℓ}) ⦃ _ : Equiv{ℓₑ}(T) ⦄ : Type{ℓ Lvl.⊔ ℓₑ} where constructor intro field unit : T uniqueness : ∀{x : T} → (x ≡ unit) open IsUnit ⦃ ... ⦄ using (unit)
src/libriscv.ads
Fabien-Chouteau/libriscv
0
16443
<reponame>Fabien-Chouteau/libriscv ------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, <NAME> -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with ESF; package LibRISCV is XLEN : constant := 32; type Byte is mod 2 ** 8 with Size => 8; type Halfword is mod 2 ** 16 with Size => 16; type Word is mod 2 ** 32 with Size => 32; type Dword is mod 2 ** 64 with Size => 64; type U_Register is mod 2 ** XLEN with Size => XLEN; -- Unsigned representation of an XLEN register type S_Register is range -(2 ** (XLEN - 1)) .. (2 ** (XLEN - 1)) - 1 with Size => XLEN; -- Signed representation of an XLEN register type Register (Signed : Boolean := False) is record case Signed is when True => S : S_Register; when False => U : U_Register; end case; end record with Pack, Size => XLEN, Unchecked_Union; subtype Address is U_Register; type GPR_Id is mod 2 ** 5 with Size => 5; function Img (Id : GPR_Id) return String; function Sign_Extend (Value : Byte) return U_Register; function Sign_Extend (Value : Halfword) return U_Register; function Sign_Extend (Value : Word) return U_Register; function Shift_Right (Value : Byte; Amount : Natural) return Byte; function Shift_Right (Value : Halfword; Amount : Natural) return Halfword; function Shift_Right (Value : Word; Amount : Natural) return Word; function Shift_Right (Value : U_Register; Amount : Natural) return U_Register; function Shift_Right_Arithmetic (Value : U_Register; Amount : Natural) return U_Register; function Shift_Left (Value : Byte; Amount : Natural) return Byte; function Shift_Left (Value : Halfword; Amount : Natural) return Halfword; function Shift_Left (Value : Word; Amount : Natural) return Word; function Shift_Left (Value : U_Register; Amount : Natural) return U_Register; pragma Import (Intrinsic, Shift_Right); pragma Import (Intrinsic, Shift_Right_Arithmetic); pragma Import (Intrinsic, Shift_Left); function Hex is new ESF.Hex_Image (Byte); function Hex is new ESF.Hex_Image (Halfword); function Hex is new ESF.Hex_Image (Word); function Hex is new ESF.Hex_Image (U_Register); end LibRISCV;
src/third_party/nasm/test/br3109604.asm
Mr-Sheep/naiveproxy
2,219
240279
<reponame>Mr-Sheep/naiveproxy<filename>src/third_party/nasm/test/br3109604.asm ;Testname=unoptimized; Arguments=-O0 -fbin -obr3109604.bin; Files=stdout stderr br3109604.bin ;Testname=optimized; Arguments=-Ox -fbin -obr3109604.bin; Files=stdout stderr br3109604.bin bits 64 b0: vmovd xmm2, [rdx+r9] e0: section .data len: dd e0 - b0 ; Should be 6
Resources/All Scripts/Bundled Scripts/Scripts/slap.scpt
bathtub/IRC.app
2
3296
<reponame>bathtub/IRC.app -- Portions of this AppleScript may incorporate work from 3rd -- parties. These portions of code are noted. All other work is -- Copyright © 2010 — 2013 Codeux Software. See README -- for full license information. on irccmd(user, destinationChannel) if destinationChannel is equal to "" then return "/debug Invalid destination channel." end if -- Yes this is just a copy of the mIRC trout slap. Someone wanted -- it so it is being made available for everyone. Customize to meet -- own needs or to make something more "cool." if user is equal to "" then set user to "self" end if return "/sme " & destinationChannel & " slaps " & trim(user) & " around a bit with a large trout" end irccmd -- trim() AppleScript function from: -- <http://macscripter.net/viewtopic.php?id=18519> on trim(someText) repeat until someText does not start with " " set someText to text 2 thru -1 of someText end repeat repeat until someText does not end with " " set someText to text 1 thru -2 of someText end repeat return someText end trim
bucket_4C/AdaBrowse/patches/patch-ad-driver.adb
jrmarino/ravensource
17
30896
<reponame>jrmarino/ravensource --- ad-driver.adb.orig 2021-09-04 15:38:31 UTC +++ ad-driver.adb @@ -470,6 +470,7 @@ package body AD.Driver is AIC.Set_File_Name (AIC.Subprogram_Index, Canonical (S (S'First + 2 .. S'Last))); elsif S = "-P" then + Error ("-P is disabled in Ravenports"); I := I + 1; Check_Following (I, N, S); if Has_Project then
source/grammar/qasm3Parser.g4
QISKit/qiskit-openqasm
0
5738
<reponame>QISKit/qiskit-openqasm<filename>source/grammar/qasm3Parser.g4 parser grammar qasm3Parser; options { tokenVocab = qasm3Lexer; } program: version? statement* EOF; version: OPENQASM VersionSpecifier SEMICOLON; // A statement is any valid single statement of an OpenQASM 3 program, with the // exception of the version-definition statement (which must be unique, and the // first statement of the file if present). This file just defines rules for // parsing; we leave semantic analysis and rejection of invalid scopes for // compiler implementations. statement: pragma // All the actual statements of the language. | aliasDeclarationStatement | assignmentStatement | barrierStatement | boxStatement | breakStatement | calibrationGrammarStatement | classicalDeclarationStatement | constDeclarationStatement | continueStatement | defStatement | defcalStatement | delayStatement | endStatement | expressionStatement | externStatement | forStatement | gateCallStatement | gateStatement | ifStatement | includeStatement | ioDeclarationStatement | measureArrowAssignmentStatement | oldStyleDeclarationStatement | quantumDeclarationStatement | resetStatement | returnStatement | whileStatement ; scope: LBRACE statement* RBRACE; pragma: PRAGMA scope; statementOrScope: statement | scope; /* Start top-level statement definitions. */ // Inclusion statements. calibrationGrammarStatement: DEFCALGRAMMAR StringLiteral SEMICOLON; includeStatement: INCLUDE StringLiteral SEMICOLON; // Control-flow statements. breakStatement: BREAK SEMICOLON; continueStatement: CONTINUE SEMICOLON; endStatement: END SEMICOLON; forStatement: FOR scalarType Identifier IN (setExpression | LBRACKET rangeExpression RBRACKET | Identifier) body=statementOrScope; ifStatement: IF LPAREN expression RPAREN if_body=statementOrScope (ELSE else_body=statementOrScope)?; returnStatement: RETURN (expression | measureExpression)? SEMICOLON; whileStatement: WHILE LPAREN expression RPAREN body=statementOrScope; // Quantum directive statements. barrierStatement: BARRIER gateOperandList? SEMICOLON; boxStatement: BOX designator? scope; delayStatement: DELAY designator gateOperandList? SEMICOLON; /* `gateCallStatement` is split in two to avoid a potential ambiguity with an * `expressionStatement` that consists of a single function call. The only * "gate" that can have no operands is `gphase` with no control modifiers, and * `gphase(pi);` looks grammatically identical to `fn(pi);`. We disambiguate by * having `gphase` be its own token, and requiring that all other gate calls * grammatically have at least one qubit. Strictly, as long as `gphase` is a * separate token, ANTLR can disambiguate the statements by the definition * order, but this is more robust. */ gateCallStatement: gateModifier* Identifier (LPAREN expressionList? RPAREN)? designator? gateOperandList SEMICOLON | gateModifier* GPHASE (LPAREN expressionList? RPAREN)? designator? gateOperandList? SEMICOLON ; // measureArrowAssignmentStatement also permits the case of not assigning the // result to any classical value too. measureArrowAssignmentStatement: measureExpression (ARROW indexedIdentifier)? SEMICOLON; resetStatement: RESET gateOperand SEMICOLON; // Primitive declaration statements. aliasDeclarationStatement: LET Identifier EQUALS aliasExpression SEMICOLON; classicalDeclarationStatement: (scalarType | arrayType) Identifier (EQUALS declarationExpression)? SEMICOLON; constDeclarationStatement: CONST scalarType Identifier EQUALS declarationExpression SEMICOLON; ioDeclarationStatement: (INPUT | OUTPUT) (scalarType | arrayType) Identifier SEMICOLON; oldStyleDeclarationStatement: (CREG | QREG) Identifier designator? SEMICOLON; quantumDeclarationStatement: qubitType Identifier SEMICOLON; // Declarations and definitions of higher-order objects. defStatement: DEF Identifier LPAREN argumentDefinitionList? RPAREN returnSignature? scope; externStatement: EXTERN Identifier LPAREN externArgumentList? RPAREN returnSignature? SEMICOLON; gateStatement: GATE Identifier (LPAREN params=identifierList? RPAREN)? qubits=identifierList scope; // Non-declaration assignments and calculations. assignmentStatement: indexedIdentifier op=(EQUALS | CompoundAssignmentOperator) (expression | measureExpression) SEMICOLON; expressionStatement: expression SEMICOLON; // TODO: this handling of the defcal block is incorrect, because it is not // constrained to consume balanced brace blocks. This needs more attention. defcalStatement: DEFCAL Identifier (LPAREN argumentDefinitionList? RPAREN)? hardwareQubitList returnSignature? LBRACE .*? RBRACE; /* End top-level statement definitions. */ /* Start expression definitions. */ // ANTLR4 can handle direct left-recursive rules, and ambiguities are guaranteed // to resolve in the order of definition. This means that the order of rules // here defines the precedence table, from most tightly binding to least. expression: LPAREN expression RPAREN # parenthesisExpression | expression indexOperator # indexExpression | <assoc=right> expression op=DOUBLE_ASTERISK expression # powerExpression | op=(TILDE | EXCLAMATION_POINT | MINUS) expression # unaryExpression | expression op=(ASTERISK | SLASH | PERCENT) expression # multiplicativeExpression | expression op=(PLUS | MINUS) expression # additiveExpression | expression op=BitshiftOperator expression # bitshiftExpression | expression op=ComparisonOperator expression # comparisonExpression | expression op=EqualityOperator expression # equalityExpression | expression op=AMPERSAND expression # bitwiseAndExpression | expression op=CARET expression # bitwiseXorExpression | expression op=PIPE expression # bitwiseOrExpression | expression op=DOUBLE_AMPERSAND expression # logicalAndExpression | expression op=DOUBLE_PIPE expression # logicalOrExpression | (scalarType | arrayType) LPAREN expression RPAREN # castExpression | DURATIONOF LPAREN scope RPAREN # durationofExpression | Identifier LPAREN expressionList? RPAREN # callExpression | ( Identifier | BinaryIntegerLiteral | OctalIntegerLiteral | DecimalIntegerLiteral | HexIntegerLiteral | FloatLiteral | ImaginaryLiteral | BooleanLiteral | BitstringLiteral | TimingLiteral | HardwareQubit ) # literalExpression ; // Special-case expressions that are only valid in certain contexts. These are // not in the expression tree, but can contain elements that are within it. aliasExpression: expression (DOUBLE_PLUS expression)*; declarationExpression: arrayLiteral | expression | measureExpression; measureExpression: MEASURE gateOperand; rangeExpression: expression? COLON expression? (COLON expression)?; setExpression: LBRACE expression (COMMA expression)* COMMA? RBRACE; arrayLiteral: LBRACE (expression | arrayLiteral) (COMMA (expression | arrayLiteral))* COMMA? RBRACE; // The general form is a comma-separated list of indexing entities. // `setExpression` is only valid when being used as a single index: registers // can support it for creating aliases, but arrays cannot. indexOperator: LBRACKET ( setExpression | (expression | rangeExpression) (COMMA (expression | rangeExpression))* COMMA? ) RBRACKET; // Alternative form to `indexExpression` for cases where an obvious l-value is // better grammatically than a generic expression. Some current uses of this // rule may be better as `expression`, leaving the semantic analysis to later // (for example in gate calls). indexedIdentifier: Identifier indexOperator*; /* End expression definitions. */ /* Start type definitions. */ returnSignature: ARROW scalarType; gateModifier: ( INV | POW LPAREN expression RPAREN | (CTRL | NEGCTRL) (LPAREN expression RPAREN)? ) AT; scalarType: BIT designator? | INT designator? | UINT designator? | FLOAT designator? | ANGLE designator? | BOOL | DURATION | STRETCH | COMPLEX (LBRACKET scalarType RBRACKET)? ; qubitType: QUBIT designator?; arrayType: ARRAY LBRACKET scalarType COMMA expressionList RBRACKET; arrayReferenceType: (CONST | MUTABLE) ARRAY LBRACKET scalarType COMMA (expressionList | DIM EQUALS expression) RBRACKET; designator: LBRACKET expression RBRACKET; gateOperand: indexedIdentifier | HardwareQubit; externArgument: scalarType | arrayReferenceType | CREG designator?; argumentDefinition: scalarType Identifier | qubitType Identifier | (CREG | QREG) Identifier designator? | arrayReferenceType Identifier ; argumentDefinitionList: argumentDefinition (COMMA argumentDefinition)* COMMA?; expressionList: expression (COMMA expression)* COMMA?; hardwareQubitList: HardwareQubit (COMMA HardwareQubit)* COMMA?; identifierList: Identifier (COMMA Identifier)* COMMA?; gateOperandList: gateOperand (COMMA gateOperand)* COMMA?; externArgumentList: externArgument (COMMA externArgument)* COMMA?;
tools/scitools/conf/understand/ada/ada83/standard83.ads
brucegua/moocos
1
1024
--****************************************************************************** -- -- package STANDARD -- --****************************************************************************** package STANDARD is -- This is the Digital Equipment Corporation VAX/VMS version of the -- Ada standard and system packages. type BOOLEAN is (FALSE, TRUE); -- The predefined relational operators for this type are as follows: -- function "=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "/=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "<" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "<=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function ">" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function ">=" (LEFT, RIGHT : BOOLEAN) return BO0LEAN; -- The predefined logical operators and the predefined logical negation -- operator are as follows: -- function "and" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "or" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "xor" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "not" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- The universal type universal_integer is predefined. type INTEGER is range -2147483648 .. 2147483647; -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "/=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "<" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "<=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function ">" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function ">=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "+" (RIGHT : INTEGER) return INTEGER; -- function "-" (RIGHT : INTEGER) return INTEGER; -- function "abs" (RIGHT : INTEGER) return INTEGER; -- function "+" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "-" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "*" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "/" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "rem" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "mod" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "**" (LEFT, : INTEGER; RIGHT : INTEGER) return INTEGER; -- An implementation may provide additional predefined integer types. -- It is recommended that the names of such additional types end -- with INTEGER as in SHORT_INTEGER or LONG_INTEGER. The specification -- of each operator for the type universal_integer, or for -- any additional predefined integer type, is obtained by replacing -- INTEGER by the name of the type in the specification of the -- corresponding operator of the type INTEGER, except for the right -- operand of the exponentiating operator. type SHORT_INTEGER is range -32768 .. 32767; type SHORT_SHORT_INTEGER is range -128 .. 127; type LONG_INTEGER is range -2147483648 .. 2147483647; type LONG_LONG_INTEGER is range -2147483648 .. 2147483647; -- The universal type universal_real is predefined. type FLOAT is digits 6 range -1.70141E+38 .. 1.70141E+38; -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "/=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "<" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "<=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function ">" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function ">=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "+" (RIGHT : FLOAT) return FLOAT; -- function "-" (RIGHT : FLOAT) return FLOAT; -- function "abs" (RIGHT : FLOAT) return FLOAT; -- function "+" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "-" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "*" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "/" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "**" (LEFT : FLOAT; RIGHT : INTEGER) return FLOAT; -- An implementation may provide additional predefined floating point -- types. It is recommended that the names of such additional types -- end with FLOAT as in SHORT_FLOAT or LONG_FLOAT. The specification -- of each operator for the type universal_real, or for any additional -- predefined floating point type, is obtained by replacing FLOAT by -- the name of the type in the specification of the corresponding -- operator of the type FLOAT. type SHORT_FLOAT is digits 14 range -1.7014118346047E+38 .. 1.7014118346047E38; type LONG_FLOAT is digits 14 range -1.7014118346047E+38 .. 1.7014118346047E+38; type LONG_LONG_FLOAT is digits 32 range -5.948657467861588254287966331400E+4931 .. 5.948657467861588254287966331400E+4931; -- In addition, the following operators are predefined for universal types: -- function "*" (LEFT : universal_integer; -- RIGHT : universal_real) return universal_real; -- function "*" (LEFT : universal_real; -- RIGHT : universal_integer) return universal_real; -- function "/" (LEFT : universal_real; -- RIGHT : universal_integer) return universal_real; -- The type universal_fixed is predefined. The only operators -- declared for this type are -- function "*" (LEFT : any_fixed_point_type; -- RIGHT : any_fixed_point_type) return universal_fixed; -- function "/" (LEFT : any_fixed_point_type; -- RIGHT : any_fixed_point_type) return universal_fixed; -- The following characters form the standard ASCII character set. -- Character literals corresponding to control characters are not -- identifiers; they are indicated in italics in this definition. type CHARACTER is (nul, soh, stx, etx, eot, enq, ack, bel, bs, ht, lf, vt, ff, cr, so, si, dle, dc1, dc2, dc3, dc4, nak, syn, etb, can, em, sub, esc, fs, gs, rs, us, ' ', '!', '"', '#', '$', '%', '&', ''', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', del); for CHARACTER use -- 128 ASCII character set without holes ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107, 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125, 126,127 ); -- The predefined operators for the type CHARACTER are the same -- as for any enumeration type. --*************************************************************************** -- -- package ASCII -- --*************************************************************************** package ASCII is -- Control characters: NUL : constant CHARACTER := nul; SOH : constant CHARACTER := soh; STX : constant CHARACTER := stx; ETX : constant CHARACTER := etx; EOT : constant CHARACTER := eot; ENQ : constant CHARACTER := enq; ACK : constant CHARACTER := ack; BEL : constant CHARACTER := bel; BS : constant CHARACTER := bs; HT : constant CHARACTER := ht; LF : constant CHARACTER := lf; VT : constant CHARACTER := vt; FF : constant CHARACTER := ff; CR : constant CHARACTER := cr; SO : constant CHARACTER := so; SI : constant CHARACTER := si; DLE : constant CHARACTER := dle; DC1 : constant CHARACTER := dc1; DC2 : constant CHARACTER := dc2; DC3 : constant CHARACTER := dc3; DC4 : constant CHARACTER := dc4; NAK : constant CHARACTER := nak; SYN : constant CHARACTER := syn; ETB : constant CHARACTER := etb; CAN : constant CHARACTER := can; EM : constant CHARACTER := em; SUB : constant CHARACTER := sub; ESC : constant CHARACTER := esc; FS : constant CHARACTER := fs; GS : constant CHARACTER := gs; RS : constant CHARACTER := rs; US : constant CHARACTER := us; DEL : constant CHARACTER := del; -- Other characters: EXCLAM : constant CHARACTER := '!'; QUOTATION : constant CHARACTER := '"'; SHARP : constant CHARACTER := '#'; DOLLAR : constant CHARACTER := '$'; PERCENT : constant CHARACTER := '%'; AMPERSAND : constant CHARACTER := '&'; COLON : constant CHARACTER := ':'; SEMICOLON : constant CHARACTER := ';'; QUERY : constant CHARACTER := '?'; AT_SIGN : constant CHARACTER := '@'; L_BRACKET : constant CHARACTER := '['; BACK_SLASH : constant CHARACTER := '\'; R_BRACKET : constant CHARACTER := ']'; CIRCUMFLEX : constant CHARACTER := '^'; UNDERLINE : constant CHARACTER := '_'; GRAVE : constant CHARACTER := '`'; L_BRACE : constant CHARACTER := '{'; BAR : constant CHARACTER := '|'; R_BRACE : constant CHARACTER := '}'; TILDE : constant CHARACTER := '~'; -- Lower case letters: LC_A : constant CHARACTER := 'a'; LC_B : constant CHARACTER := 'b'; LC_C : constant CHARACTER := 'c'; LC_D : constant CHARACTER := 'd'; LC_E : constant CHARACTER := 'e'; LC_F : constant CHARACTER := 'f'; LC_G : constant CHARACTER := 'g'; LC_H : constant CHARACTER := 'h'; LC_I : constant CHARACTER := 'i'; LC_J : constant CHARACTER := 'j'; LC_K : constant CHARACTER := 'k'; LC_L : constant CHARACTER := 'l'; LC_M : constant CHARACTER := 'm'; LC_N : constant CHARACTER := 'n'; LC_O : constant CHARACTER := 'o'; LC_P : constant CHARACTER := 'p'; LC_Q : constant CHARACTER := 'q'; LC_R : constant CHARACTER := 'r'; LC_S : constant CHARACTER := 's'; LC_T : constant CHARACTER := 't'; LC_U : constant CHARACTER := 'u'; LC_V : constant CHARACTER := 'v'; LC_W : constant CHARACTER := 'w'; LC_X : constant CHARACTER := 'x'; LC_Y : Constant CHARACTER := 'y'; LC_Z : Constant CHARACTER := 'z'; end ASCII; -- Predefined subtypes: subtype NATURAL is INTEGER range 0 .. INTEGER'LAST; subtype POSITIVE is INTEGER range 1 .. INTEGER'LAST; -- Predefined string type: type STRING is array(POSITIVE range<>) of CHARACTER; pragma PACK(STRING); -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "/" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "<" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "<=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function ">" (LEFT, RIGHT : STRING) return BOOLEAN; -- function ">=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "&" (LEFT : STRING; -- RIGHT : STRING) return STRING; -- function "&" (LEFT : CHARACTER; -- RIGHT : STRING) return STRING; -- function "&" (LEFT : STRING; -- RIGHT : CHARACTER) return STRING; -- function "&" (LEFT : CHARACTER; -- RIGHT : CHARACTER) return STRING; type DURATION is delta 1.00000E-04 range -131072.0000 .. 131071.9999; -- The predefined operators for the type DURATION are the same as for -- any fixed point type. -- The predefined exceptions: CONSTRAINT_ERROR : exception; NUMERIC_ERROR : exception; PROGRAM_ERROR : exception; STORAGE_ERROR : exception; TASKING_ERROR : exception; end STANDARD;
date.asm
joeofportland/project4-3
0
12900
_date: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "user.h" #include "date.h" int main(int argc, char *argv[]) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 57 push %edi 4: 56 push %esi 5: 53 push %ebx 6: 83 e4 f0 and $0xfffffff0,%esp 9: 83 ec 50 sub $0x50,%esp struct rtcdate r; int pid = getpid(); c: e8 b9 03 00 00 call 3ca <getpid> 11: 89 44 24 4c mov %eax,0x4c(%esp) int gid = getgid(); 15: e8 e8 03 00 00 call 402 <getgid> 1a: 89 44 24 48 mov %eax,0x48(%esp) int uid = getuid(); 1e: e8 d7 03 00 00 call 3fa <getuid> 23: 89 44 24 44 mov %eax,0x44(%esp) int ppid = getppid(); 27: e8 de 03 00 00 call 40a <getppid> 2c: 89 44 24 40 mov %eax,0x40(%esp) printf(2, "PID:%d GID:%d UID:%d PPID:%d ", pid,gid,uid,ppid); 30: 8b 44 24 40 mov 0x40(%esp),%eax 34: 89 44 24 14 mov %eax,0x14(%esp) 38: 8b 44 24 44 mov 0x44(%esp),%eax 3c: 89 44 24 10 mov %eax,0x10(%esp) 40: 8b 44 24 48 mov 0x48(%esp),%eax 44: 89 44 24 0c mov %eax,0xc(%esp) 48: 8b 44 24 4c mov 0x4c(%esp),%eax 4c: 89 44 24 08 mov %eax,0x8(%esp) 50: c7 44 24 04 d8 08 00 movl $0x8d8,0x4(%esp) 57: 00 58: c7 04 24 02 00 00 00 movl $0x2,(%esp) 5f: e8 a6 04 00 00 call 50a <printf> if (date(&r)) { 64: 8d 44 24 28 lea 0x28(%esp),%eax 68: 89 04 24 mov %eax,(%esp) 6b: e8 7a 03 00 00 call 3ea <date> 70: 85 c0 test %eax,%eax 72: 74 19 je 8d <main+0x8d> printf(2, "date failed\n"); 74: c7 44 24 04 f8 08 00 movl $0x8f8,0x4(%esp) 7b: 00 7c: c7 04 24 02 00 00 00 movl $0x2,(%esp) 83: e8 82 04 00 00 call 50a <printf> exit (); 88: e8 bd 02 00 00 call 34a <exit> } // your code to print the time in any format your like date(&r); 8d: 8d 44 24 28 lea 0x28(%esp),%eax 91: 89 04 24 mov %eax,(%esp) 94: e8 51 03 00 00 call 3ea <date> printf(1,"UTC Time (h:m:s): %d:%d:%d : UTC Date (m/d/y): %d/%d/%d",r.hour, r.minute, r.second,r.month, r.day, r.year); 99: 8b 7c 24 3c mov 0x3c(%esp),%edi 9d: 8b 74 24 34 mov 0x34(%esp),%esi a1: 8b 5c 24 38 mov 0x38(%esp),%ebx a5: 8b 4c 24 28 mov 0x28(%esp),%ecx a9: 8b 54 24 2c mov 0x2c(%esp),%edx ad: 8b 44 24 30 mov 0x30(%esp),%eax b1: 89 7c 24 1c mov %edi,0x1c(%esp) b5: 89 74 24 18 mov %esi,0x18(%esp) b9: 89 5c 24 14 mov %ebx,0x14(%esp) bd: 89 4c 24 10 mov %ecx,0x10(%esp) c1: 89 54 24 0c mov %edx,0xc(%esp) c5: 89 44 24 08 mov %eax,0x8(%esp) c9: c7 44 24 04 08 09 00 movl $0x908,0x4(%esp) d0: 00 d1: c7 04 24 01 00 00 00 movl $0x1,(%esp) d8: e8 2d 04 00 00 call 50a <printf> exit(); dd: e8 68 02 00 00 call 34a <exit> 000000e2 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { e2: 55 push %ebp e3: 89 e5 mov %esp,%ebp e5: 57 push %edi e6: 53 push %ebx asm volatile("cld; rep stosb" : e7: 8b 4d 08 mov 0x8(%ebp),%ecx ea: 8b 55 10 mov 0x10(%ebp),%edx ed: 8b 45 0c mov 0xc(%ebp),%eax f0: 89 cb mov %ecx,%ebx f2: 89 df mov %ebx,%edi f4: 89 d1 mov %edx,%ecx f6: fc cld f7: f3 aa rep stos %al,%es:(%edi) f9: 89 ca mov %ecx,%edx fb: 89 fb mov %edi,%ebx fd: 89 5d 08 mov %ebx,0x8(%ebp) 100: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 103: 5b pop %ebx 104: 5f pop %edi 105: 5d pop %ebp 106: c3 ret 00000107 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 107: 55 push %ebp 108: 89 e5 mov %esp,%ebp 10a: 83 ec 10 sub $0x10,%esp char *os; os = s; 10d: 8b 45 08 mov 0x8(%ebp),%eax 110: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 113: 90 nop 114: 8b 45 08 mov 0x8(%ebp),%eax 117: 8d 50 01 lea 0x1(%eax),%edx 11a: 89 55 08 mov %edx,0x8(%ebp) 11d: 8b 55 0c mov 0xc(%ebp),%edx 120: 8d 4a 01 lea 0x1(%edx),%ecx 123: 89 4d 0c mov %ecx,0xc(%ebp) 126: 0f b6 12 movzbl (%edx),%edx 129: 88 10 mov %dl,(%eax) 12b: 0f b6 00 movzbl (%eax),%eax 12e: 84 c0 test %al,%al 130: 75 e2 jne 114 <strcpy+0xd> ; return os; 132: 8b 45 fc mov -0x4(%ebp),%eax } 135: c9 leave 136: c3 ret 00000137 <strcmp>: int strcmp(const char *p, const char *q) { 137: 55 push %ebp 138: 89 e5 mov %esp,%ebp while(*p && *p == *q) 13a: eb 08 jmp 144 <strcmp+0xd> p++, q++; 13c: 83 45 08 01 addl $0x1,0x8(%ebp) 140: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 144: 8b 45 08 mov 0x8(%ebp),%eax 147: 0f b6 00 movzbl (%eax),%eax 14a: 84 c0 test %al,%al 14c: 74 10 je 15e <strcmp+0x27> 14e: 8b 45 08 mov 0x8(%ebp),%eax 151: 0f b6 10 movzbl (%eax),%edx 154: 8b 45 0c mov 0xc(%ebp),%eax 157: 0f b6 00 movzbl (%eax),%eax 15a: 38 c2 cmp %al,%dl 15c: 74 de je 13c <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 15e: 8b 45 08 mov 0x8(%ebp),%eax 161: 0f b6 00 movzbl (%eax),%eax 164: 0f b6 d0 movzbl %al,%edx 167: 8b 45 0c mov 0xc(%ebp),%eax 16a: 0f b6 00 movzbl (%eax),%eax 16d: 0f b6 c0 movzbl %al,%eax 170: 29 c2 sub %eax,%edx 172: 89 d0 mov %edx,%eax } 174: 5d pop %ebp 175: c3 ret 00000176 <strlen>: uint strlen(char *s) { 176: 55 push %ebp 177: 89 e5 mov %esp,%ebp 179: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 17c: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 183: eb 04 jmp 189 <strlen+0x13> 185: 83 45 fc 01 addl $0x1,-0x4(%ebp) 189: 8b 55 fc mov -0x4(%ebp),%edx 18c: 8b 45 08 mov 0x8(%ebp),%eax 18f: 01 d0 add %edx,%eax 191: 0f b6 00 movzbl (%eax),%eax 194: 84 c0 test %al,%al 196: 75 ed jne 185 <strlen+0xf> ; return n; 198: 8b 45 fc mov -0x4(%ebp),%eax } 19b: c9 leave 19c: c3 ret 0000019d <memset>: void* memset(void *dst, int c, uint n) { 19d: 55 push %ebp 19e: 89 e5 mov %esp,%ebp 1a0: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); 1a3: 8b 45 10 mov 0x10(%ebp),%eax 1a6: 89 44 24 08 mov %eax,0x8(%esp) 1aa: 8b 45 0c mov 0xc(%ebp),%eax 1ad: 89 44 24 04 mov %eax,0x4(%esp) 1b1: 8b 45 08 mov 0x8(%ebp),%eax 1b4: 89 04 24 mov %eax,(%esp) 1b7: e8 26 ff ff ff call e2 <stosb> return dst; 1bc: 8b 45 08 mov 0x8(%ebp),%eax } 1bf: c9 leave 1c0: c3 ret 000001c1 <strchr>: char* strchr(const char *s, char c) { 1c1: 55 push %ebp 1c2: 89 e5 mov %esp,%ebp 1c4: 83 ec 04 sub $0x4,%esp 1c7: 8b 45 0c mov 0xc(%ebp),%eax 1ca: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 1cd: eb 14 jmp 1e3 <strchr+0x22> if(*s == c) 1cf: 8b 45 08 mov 0x8(%ebp),%eax 1d2: 0f b6 00 movzbl (%eax),%eax 1d5: 3a 45 fc cmp -0x4(%ebp),%al 1d8: 75 05 jne 1df <strchr+0x1e> return (char*)s; 1da: 8b 45 08 mov 0x8(%ebp),%eax 1dd: eb 13 jmp 1f2 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 1df: 83 45 08 01 addl $0x1,0x8(%ebp) 1e3: 8b 45 08 mov 0x8(%ebp),%eax 1e6: 0f b6 00 movzbl (%eax),%eax 1e9: 84 c0 test %al,%al 1eb: 75 e2 jne 1cf <strchr+0xe> if(*s == c) return (char*)s; return 0; 1ed: b8 00 00 00 00 mov $0x0,%eax } 1f2: c9 leave 1f3: c3 ret 000001f4 <gets>: char* gets(char *buf, int max) { 1f4: 55 push %ebp 1f5: 89 e5 mov %esp,%ebp 1f7: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 1fa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 201: eb 4c jmp 24f <gets+0x5b> cc = read(0, &c, 1); 203: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 20a: 00 20b: 8d 45 ef lea -0x11(%ebp),%eax 20e: 89 44 24 04 mov %eax,0x4(%esp) 212: c7 04 24 00 00 00 00 movl $0x0,(%esp) 219: e8 44 01 00 00 call 362 <read> 21e: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 221: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 225: 7f 02 jg 229 <gets+0x35> break; 227: eb 31 jmp 25a <gets+0x66> buf[i++] = c; 229: 8b 45 f4 mov -0xc(%ebp),%eax 22c: 8d 50 01 lea 0x1(%eax),%edx 22f: 89 55 f4 mov %edx,-0xc(%ebp) 232: 89 c2 mov %eax,%edx 234: 8b 45 08 mov 0x8(%ebp),%eax 237: 01 c2 add %eax,%edx 239: 0f b6 45 ef movzbl -0x11(%ebp),%eax 23d: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 23f: 0f b6 45 ef movzbl -0x11(%ebp),%eax 243: 3c 0a cmp $0xa,%al 245: 74 13 je 25a <gets+0x66> 247: 0f b6 45 ef movzbl -0x11(%ebp),%eax 24b: 3c 0d cmp $0xd,%al 24d: 74 0b je 25a <gets+0x66> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 24f: 8b 45 f4 mov -0xc(%ebp),%eax 252: 83 c0 01 add $0x1,%eax 255: 3b 45 0c cmp 0xc(%ebp),%eax 258: 7c a9 jl 203 <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 25a: 8b 55 f4 mov -0xc(%ebp),%edx 25d: 8b 45 08 mov 0x8(%ebp),%eax 260: 01 d0 add %edx,%eax 262: c6 00 00 movb $0x0,(%eax) return buf; 265: 8b 45 08 mov 0x8(%ebp),%eax } 268: c9 leave 269: c3 ret 0000026a <stat>: int stat(char *n, struct stat *st) { 26a: 55 push %ebp 26b: 89 e5 mov %esp,%ebp 26d: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 270: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 277: 00 278: 8b 45 08 mov 0x8(%ebp),%eax 27b: 89 04 24 mov %eax,(%esp) 27e: e8 07 01 00 00 call 38a <open> 283: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 286: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 28a: 79 07 jns 293 <stat+0x29> return -1; 28c: b8 ff ff ff ff mov $0xffffffff,%eax 291: eb 23 jmp 2b6 <stat+0x4c> r = fstat(fd, st); 293: 8b 45 0c mov 0xc(%ebp),%eax 296: 89 44 24 04 mov %eax,0x4(%esp) 29a: 8b 45 f4 mov -0xc(%ebp),%eax 29d: 89 04 24 mov %eax,(%esp) 2a0: e8 fd 00 00 00 call 3a2 <fstat> 2a5: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 2a8: 8b 45 f4 mov -0xc(%ebp),%eax 2ab: 89 04 24 mov %eax,(%esp) 2ae: e8 bf 00 00 00 call 372 <close> return r; 2b3: 8b 45 f0 mov -0x10(%ebp),%eax } 2b6: c9 leave 2b7: c3 ret 000002b8 <atoi>: int atoi(const char *s) { 2b8: 55 push %ebp 2b9: 89 e5 mov %esp,%ebp 2bb: 83 ec 10 sub $0x10,%esp int n; n = 0; 2be: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 2c5: eb 25 jmp 2ec <atoi+0x34> n = n*10 + *s++ - '0'; 2c7: 8b 55 fc mov -0x4(%ebp),%edx 2ca: 89 d0 mov %edx,%eax 2cc: c1 e0 02 shl $0x2,%eax 2cf: 01 d0 add %edx,%eax 2d1: 01 c0 add %eax,%eax 2d3: 89 c1 mov %eax,%ecx 2d5: 8b 45 08 mov 0x8(%ebp),%eax 2d8: 8d 50 01 lea 0x1(%eax),%edx 2db: 89 55 08 mov %edx,0x8(%ebp) 2de: 0f b6 00 movzbl (%eax),%eax 2e1: 0f be c0 movsbl %al,%eax 2e4: 01 c8 add %ecx,%eax 2e6: 83 e8 30 sub $0x30,%eax 2e9: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 2ec: 8b 45 08 mov 0x8(%ebp),%eax 2ef: 0f b6 00 movzbl (%eax),%eax 2f2: 3c 2f cmp $0x2f,%al 2f4: 7e 0a jle 300 <atoi+0x48> 2f6: 8b 45 08 mov 0x8(%ebp),%eax 2f9: 0f b6 00 movzbl (%eax),%eax 2fc: 3c 39 cmp $0x39,%al 2fe: 7e c7 jle 2c7 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 300: 8b 45 fc mov -0x4(%ebp),%eax } 303: c9 leave 304: c3 ret 00000305 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 305: 55 push %ebp 306: 89 e5 mov %esp,%ebp 308: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 30b: 8b 45 08 mov 0x8(%ebp),%eax 30e: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 311: 8b 45 0c mov 0xc(%ebp),%eax 314: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 317: eb 17 jmp 330 <memmove+0x2b> *dst++ = *src++; 319: 8b 45 fc mov -0x4(%ebp),%eax 31c: 8d 50 01 lea 0x1(%eax),%edx 31f: 89 55 fc mov %edx,-0x4(%ebp) 322: 8b 55 f8 mov -0x8(%ebp),%edx 325: 8d 4a 01 lea 0x1(%edx),%ecx 328: 89 4d f8 mov %ecx,-0x8(%ebp) 32b: 0f b6 12 movzbl (%edx),%edx 32e: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 330: 8b 45 10 mov 0x10(%ebp),%eax 333: 8d 50 ff lea -0x1(%eax),%edx 336: 89 55 10 mov %edx,0x10(%ebp) 339: 85 c0 test %eax,%eax 33b: 7f dc jg 319 <memmove+0x14> *dst++ = *src++; return vdst; 33d: 8b 45 08 mov 0x8(%ebp),%eax } 340: c9 leave 341: c3 ret 00000342 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 342: b8 01 00 00 00 mov $0x1,%eax 347: cd 40 int $0x40 349: c3 ret 0000034a <exit>: SYSCALL(exit) 34a: b8 02 00 00 00 mov $0x2,%eax 34f: cd 40 int $0x40 351: c3 ret 00000352 <wait>: SYSCALL(wait) 352: b8 03 00 00 00 mov $0x3,%eax 357: cd 40 int $0x40 359: c3 ret 0000035a <pipe>: SYSCALL(pipe) 35a: b8 04 00 00 00 mov $0x4,%eax 35f: cd 40 int $0x40 361: c3 ret 00000362 <read>: SYSCALL(read) 362: b8 05 00 00 00 mov $0x5,%eax 367: cd 40 int $0x40 369: c3 ret 0000036a <write>: SYSCALL(write) 36a: b8 10 00 00 00 mov $0x10,%eax 36f: cd 40 int $0x40 371: c3 ret 00000372 <close>: SYSCALL(close) 372: b8 15 00 00 00 mov $0x15,%eax 377: cd 40 int $0x40 379: c3 ret 0000037a <kill>: SYSCALL(kill) 37a: b8 06 00 00 00 mov $0x6,%eax 37f: cd 40 int $0x40 381: c3 ret 00000382 <exec>: SYSCALL(exec) 382: b8 07 00 00 00 mov $0x7,%eax 387: cd 40 int $0x40 389: c3 ret 0000038a <open>: SYSCALL(open) 38a: b8 0f 00 00 00 mov $0xf,%eax 38f: cd 40 int $0x40 391: c3 ret 00000392 <mknod>: SYSCALL(mknod) 392: b8 11 00 00 00 mov $0x11,%eax 397: cd 40 int $0x40 399: c3 ret 0000039a <unlink>: SYSCALL(unlink) 39a: b8 12 00 00 00 mov $0x12,%eax 39f: cd 40 int $0x40 3a1: c3 ret 000003a2 <fstat>: SYSCALL(fstat) 3a2: b8 08 00 00 00 mov $0x8,%eax 3a7: cd 40 int $0x40 3a9: c3 ret 000003aa <link>: SYSCALL(link) 3aa: b8 13 00 00 00 mov $0x13,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <mkdir>: SYSCALL(mkdir) 3b2: b8 14 00 00 00 mov $0x14,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <chdir>: SYSCALL(chdir) 3ba: b8 09 00 00 00 mov $0x9,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <dup>: SYSCALL(dup) 3c2: b8 0a 00 00 00 mov $0xa,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <getpid>: SYSCALL(getpid) 3ca: b8 0b 00 00 00 mov $0xb,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <sbrk>: SYSCALL(sbrk) 3d2: b8 0c 00 00 00 mov $0xc,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <sleep>: SYSCALL(sleep) 3da: b8 0d 00 00 00 mov $0xd,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <uptime>: SYSCALL(uptime) 3e2: b8 0e 00 00 00 mov $0xe,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <date>: SYSCALL(date) 3ea: b8 16 00 00 00 mov $0x16,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <timem>: SYSCALL(timem) 3f2: b8 17 00 00 00 mov $0x17,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <getuid>: SYSCALL(getuid) 3fa: b8 18 00 00 00 mov $0x18,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <getgid>: SYSCALL(getgid) 402: b8 19 00 00 00 mov $0x19,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <getppid>: SYSCALL(getppid) 40a: b8 1a 00 00 00 mov $0x1a,%eax 40f: cd 40 int $0x40 411: c3 ret 00000412 <setuid>: SYSCALL(setuid) 412: b8 1b 00 00 00 mov $0x1b,%eax 417: cd 40 int $0x40 419: c3 ret 0000041a <setgid>: SYSCALL(setgid) 41a: b8 1c 00 00 00 mov $0x1c,%eax 41f: cd 40 int $0x40 421: c3 ret 00000422 <getprocs>: SYSCALL(getprocs) 422: b8 1d 00 00 00 mov $0x1d,%eax 427: cd 40 int $0x40 429: c3 ret 0000042a <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 42a: 55 push %ebp 42b: 89 e5 mov %esp,%ebp 42d: 83 ec 18 sub $0x18,%esp 430: 8b 45 0c mov 0xc(%ebp),%eax 433: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 436: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 43d: 00 43e: 8d 45 f4 lea -0xc(%ebp),%eax 441: 89 44 24 04 mov %eax,0x4(%esp) 445: 8b 45 08 mov 0x8(%ebp),%eax 448: 89 04 24 mov %eax,(%esp) 44b: e8 1a ff ff ff call 36a <write> } 450: c9 leave 451: c3 ret 00000452 <printint>: static void printint(int fd, int xx, int base, int sgn) { 452: 55 push %ebp 453: 89 e5 mov %esp,%ebp 455: 56 push %esi 456: 53 push %ebx 457: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 45a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 461: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 465: 74 17 je 47e <printint+0x2c> 467: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 46b: 79 11 jns 47e <printint+0x2c> neg = 1; 46d: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 474: 8b 45 0c mov 0xc(%ebp),%eax 477: f7 d8 neg %eax 479: 89 45 ec mov %eax,-0x14(%ebp) 47c: eb 06 jmp 484 <printint+0x32> } else { x = xx; 47e: 8b 45 0c mov 0xc(%ebp),%eax 481: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 484: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 48b: 8b 4d f4 mov -0xc(%ebp),%ecx 48e: 8d 41 01 lea 0x1(%ecx),%eax 491: 89 45 f4 mov %eax,-0xc(%ebp) 494: 8b 5d 10 mov 0x10(%ebp),%ebx 497: 8b 45 ec mov -0x14(%ebp),%eax 49a: ba 00 00 00 00 mov $0x0,%edx 49f: f7 f3 div %ebx 4a1: 89 d0 mov %edx,%eax 4a3: 0f b6 80 90 0b 00 00 movzbl 0xb90(%eax),%eax 4aa: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 4ae: 8b 75 10 mov 0x10(%ebp),%esi 4b1: 8b 45 ec mov -0x14(%ebp),%eax 4b4: ba 00 00 00 00 mov $0x0,%edx 4b9: f7 f6 div %esi 4bb: 89 45 ec mov %eax,-0x14(%ebp) 4be: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 4c2: 75 c7 jne 48b <printint+0x39> if(neg) 4c4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 4c8: 74 10 je 4da <printint+0x88> buf[i++] = '-'; 4ca: 8b 45 f4 mov -0xc(%ebp),%eax 4cd: 8d 50 01 lea 0x1(%eax),%edx 4d0: 89 55 f4 mov %edx,-0xc(%ebp) 4d3: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 4d8: eb 1f jmp 4f9 <printint+0xa7> 4da: eb 1d jmp 4f9 <printint+0xa7> putc(fd, buf[i]); 4dc: 8d 55 dc lea -0x24(%ebp),%edx 4df: 8b 45 f4 mov -0xc(%ebp),%eax 4e2: 01 d0 add %edx,%eax 4e4: 0f b6 00 movzbl (%eax),%eax 4e7: 0f be c0 movsbl %al,%eax 4ea: 89 44 24 04 mov %eax,0x4(%esp) 4ee: 8b 45 08 mov 0x8(%ebp),%eax 4f1: 89 04 24 mov %eax,(%esp) 4f4: e8 31 ff ff ff call 42a <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4f9: 83 6d f4 01 subl $0x1,-0xc(%ebp) 4fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 501: 79 d9 jns 4dc <printint+0x8a> putc(fd, buf[i]); } 503: 83 c4 30 add $0x30,%esp 506: 5b pop %ebx 507: 5e pop %esi 508: 5d pop %ebp 509: c3 ret 0000050a <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 50a: 55 push %ebp 50b: 89 e5 mov %esp,%ebp 50d: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 510: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 517: 8d 45 0c lea 0xc(%ebp),%eax 51a: 83 c0 04 add $0x4,%eax 51d: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 520: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 527: e9 7c 01 00 00 jmp 6a8 <printf+0x19e> c = fmt[i] & 0xff; 52c: 8b 55 0c mov 0xc(%ebp),%edx 52f: 8b 45 f0 mov -0x10(%ebp),%eax 532: 01 d0 add %edx,%eax 534: 0f b6 00 movzbl (%eax),%eax 537: 0f be c0 movsbl %al,%eax 53a: 25 ff 00 00 00 and $0xff,%eax 53f: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 542: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 546: 75 2c jne 574 <printf+0x6a> if(c == '%'){ 548: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 54c: 75 0c jne 55a <printf+0x50> state = '%'; 54e: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 555: e9 4a 01 00 00 jmp 6a4 <printf+0x19a> } else { putc(fd, c); 55a: 8b 45 e4 mov -0x1c(%ebp),%eax 55d: 0f be c0 movsbl %al,%eax 560: 89 44 24 04 mov %eax,0x4(%esp) 564: 8b 45 08 mov 0x8(%ebp),%eax 567: 89 04 24 mov %eax,(%esp) 56a: e8 bb fe ff ff call 42a <putc> 56f: e9 30 01 00 00 jmp 6a4 <printf+0x19a> } } else if(state == '%'){ 574: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 578: 0f 85 26 01 00 00 jne 6a4 <printf+0x19a> if(c == 'd'){ 57e: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 582: 75 2d jne 5b1 <printf+0xa7> printint(fd, *ap, 10, 1); 584: 8b 45 e8 mov -0x18(%ebp),%eax 587: 8b 00 mov (%eax),%eax 589: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 590: 00 591: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 598: 00 599: 89 44 24 04 mov %eax,0x4(%esp) 59d: 8b 45 08 mov 0x8(%ebp),%eax 5a0: 89 04 24 mov %eax,(%esp) 5a3: e8 aa fe ff ff call 452 <printint> ap++; 5a8: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5ac: e9 ec 00 00 00 jmp 69d <printf+0x193> } else if(c == 'x' || c == 'p'){ 5b1: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 5b5: 74 06 je 5bd <printf+0xb3> 5b7: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 5bb: 75 2d jne 5ea <printf+0xe0> printint(fd, *ap, 16, 0); 5bd: 8b 45 e8 mov -0x18(%ebp),%eax 5c0: 8b 00 mov (%eax),%eax 5c2: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 5c9: 00 5ca: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 5d1: 00 5d2: 89 44 24 04 mov %eax,0x4(%esp) 5d6: 8b 45 08 mov 0x8(%ebp),%eax 5d9: 89 04 24 mov %eax,(%esp) 5dc: e8 71 fe ff ff call 452 <printint> ap++; 5e1: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5e5: e9 b3 00 00 00 jmp 69d <printf+0x193> } else if(c == 's'){ 5ea: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 5ee: 75 45 jne 635 <printf+0x12b> s = (char*)*ap; 5f0: 8b 45 e8 mov -0x18(%ebp),%eax 5f3: 8b 00 mov (%eax),%eax 5f5: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 5f8: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 5fc: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 600: 75 09 jne 60b <printf+0x101> s = "(null)"; 602: c7 45 f4 40 09 00 00 movl $0x940,-0xc(%ebp) while(*s != 0){ 609: eb 1e jmp 629 <printf+0x11f> 60b: eb 1c jmp 629 <printf+0x11f> putc(fd, *s); 60d: 8b 45 f4 mov -0xc(%ebp),%eax 610: 0f b6 00 movzbl (%eax),%eax 613: 0f be c0 movsbl %al,%eax 616: 89 44 24 04 mov %eax,0x4(%esp) 61a: 8b 45 08 mov 0x8(%ebp),%eax 61d: 89 04 24 mov %eax,(%esp) 620: e8 05 fe ff ff call 42a <putc> s++; 625: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 629: 8b 45 f4 mov -0xc(%ebp),%eax 62c: 0f b6 00 movzbl (%eax),%eax 62f: 84 c0 test %al,%al 631: 75 da jne 60d <printf+0x103> 633: eb 68 jmp 69d <printf+0x193> putc(fd, *s); s++; } } else if(c == 'c'){ 635: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 639: 75 1d jne 658 <printf+0x14e> putc(fd, *ap); 63b: 8b 45 e8 mov -0x18(%ebp),%eax 63e: 8b 00 mov (%eax),%eax 640: 0f be c0 movsbl %al,%eax 643: 89 44 24 04 mov %eax,0x4(%esp) 647: 8b 45 08 mov 0x8(%ebp),%eax 64a: 89 04 24 mov %eax,(%esp) 64d: e8 d8 fd ff ff call 42a <putc> ap++; 652: 83 45 e8 04 addl $0x4,-0x18(%ebp) 656: eb 45 jmp 69d <printf+0x193> } else if(c == '%'){ 658: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 65c: 75 17 jne 675 <printf+0x16b> putc(fd, c); 65e: 8b 45 e4 mov -0x1c(%ebp),%eax 661: 0f be c0 movsbl %al,%eax 664: 89 44 24 04 mov %eax,0x4(%esp) 668: 8b 45 08 mov 0x8(%ebp),%eax 66b: 89 04 24 mov %eax,(%esp) 66e: e8 b7 fd ff ff call 42a <putc> 673: eb 28 jmp 69d <printf+0x193> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 675: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 67c: 00 67d: 8b 45 08 mov 0x8(%ebp),%eax 680: 89 04 24 mov %eax,(%esp) 683: e8 a2 fd ff ff call 42a <putc> putc(fd, c); 688: 8b 45 e4 mov -0x1c(%ebp),%eax 68b: 0f be c0 movsbl %al,%eax 68e: 89 44 24 04 mov %eax,0x4(%esp) 692: 8b 45 08 mov 0x8(%ebp),%eax 695: 89 04 24 mov %eax,(%esp) 698: e8 8d fd ff ff call 42a <putc> } state = 0; 69d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 6a4: 83 45 f0 01 addl $0x1,-0x10(%ebp) 6a8: 8b 55 0c mov 0xc(%ebp),%edx 6ab: 8b 45 f0 mov -0x10(%ebp),%eax 6ae: 01 d0 add %edx,%eax 6b0: 0f b6 00 movzbl (%eax),%eax 6b3: 84 c0 test %al,%al 6b5: 0f 85 71 fe ff ff jne 52c <printf+0x22> putc(fd, c); } state = 0; } } } 6bb: c9 leave 6bc: c3 ret 000006bd <free>: static Header base; static Header *freep; void free(void *ap) { 6bd: 55 push %ebp 6be: 89 e5 mov %esp,%ebp 6c0: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 6c3: 8b 45 08 mov 0x8(%ebp),%eax 6c6: 83 e8 08 sub $0x8,%eax 6c9: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6cc: a1 ac 0b 00 00 mov 0xbac,%eax 6d1: 89 45 fc mov %eax,-0x4(%ebp) 6d4: eb 24 jmp 6fa <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6d6: 8b 45 fc mov -0x4(%ebp),%eax 6d9: 8b 00 mov (%eax),%eax 6db: 3b 45 fc cmp -0x4(%ebp),%eax 6de: 77 12 ja 6f2 <free+0x35> 6e0: 8b 45 f8 mov -0x8(%ebp),%eax 6e3: 3b 45 fc cmp -0x4(%ebp),%eax 6e6: 77 24 ja 70c <free+0x4f> 6e8: 8b 45 fc mov -0x4(%ebp),%eax 6eb: 8b 00 mov (%eax),%eax 6ed: 3b 45 f8 cmp -0x8(%ebp),%eax 6f0: 77 1a ja 70c <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6f2: 8b 45 fc mov -0x4(%ebp),%eax 6f5: 8b 00 mov (%eax),%eax 6f7: 89 45 fc mov %eax,-0x4(%ebp) 6fa: 8b 45 f8 mov -0x8(%ebp),%eax 6fd: 3b 45 fc cmp -0x4(%ebp),%eax 700: 76 d4 jbe 6d6 <free+0x19> 702: 8b 45 fc mov -0x4(%ebp),%eax 705: 8b 00 mov (%eax),%eax 707: 3b 45 f8 cmp -0x8(%ebp),%eax 70a: 76 ca jbe 6d6 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 70c: 8b 45 f8 mov -0x8(%ebp),%eax 70f: 8b 40 04 mov 0x4(%eax),%eax 712: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 719: 8b 45 f8 mov -0x8(%ebp),%eax 71c: 01 c2 add %eax,%edx 71e: 8b 45 fc mov -0x4(%ebp),%eax 721: 8b 00 mov (%eax),%eax 723: 39 c2 cmp %eax,%edx 725: 75 24 jne 74b <free+0x8e> bp->s.size += p->s.ptr->s.size; 727: 8b 45 f8 mov -0x8(%ebp),%eax 72a: 8b 50 04 mov 0x4(%eax),%edx 72d: 8b 45 fc mov -0x4(%ebp),%eax 730: 8b 00 mov (%eax),%eax 732: 8b 40 04 mov 0x4(%eax),%eax 735: 01 c2 add %eax,%edx 737: 8b 45 f8 mov -0x8(%ebp),%eax 73a: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 73d: 8b 45 fc mov -0x4(%ebp),%eax 740: 8b 00 mov (%eax),%eax 742: 8b 10 mov (%eax),%edx 744: 8b 45 f8 mov -0x8(%ebp),%eax 747: 89 10 mov %edx,(%eax) 749: eb 0a jmp 755 <free+0x98> } else bp->s.ptr = p->s.ptr; 74b: 8b 45 fc mov -0x4(%ebp),%eax 74e: 8b 10 mov (%eax),%edx 750: 8b 45 f8 mov -0x8(%ebp),%eax 753: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 755: 8b 45 fc mov -0x4(%ebp),%eax 758: 8b 40 04 mov 0x4(%eax),%eax 75b: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 762: 8b 45 fc mov -0x4(%ebp),%eax 765: 01 d0 add %edx,%eax 767: 3b 45 f8 cmp -0x8(%ebp),%eax 76a: 75 20 jne 78c <free+0xcf> p->s.size += bp->s.size; 76c: 8b 45 fc mov -0x4(%ebp),%eax 76f: 8b 50 04 mov 0x4(%eax),%edx 772: 8b 45 f8 mov -0x8(%ebp),%eax 775: 8b 40 04 mov 0x4(%eax),%eax 778: 01 c2 add %eax,%edx 77a: 8b 45 fc mov -0x4(%ebp),%eax 77d: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 780: 8b 45 f8 mov -0x8(%ebp),%eax 783: 8b 10 mov (%eax),%edx 785: 8b 45 fc mov -0x4(%ebp),%eax 788: 89 10 mov %edx,(%eax) 78a: eb 08 jmp 794 <free+0xd7> } else p->s.ptr = bp; 78c: 8b 45 fc mov -0x4(%ebp),%eax 78f: 8b 55 f8 mov -0x8(%ebp),%edx 792: 89 10 mov %edx,(%eax) freep = p; 794: 8b 45 fc mov -0x4(%ebp),%eax 797: a3 ac 0b 00 00 mov %eax,0xbac } 79c: c9 leave 79d: c3 ret 0000079e <morecore>: static Header* morecore(uint nu) { 79e: 55 push %ebp 79f: 89 e5 mov %esp,%ebp 7a1: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 7a4: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 7ab: 77 07 ja 7b4 <morecore+0x16> nu = 4096; 7ad: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 7b4: 8b 45 08 mov 0x8(%ebp),%eax 7b7: c1 e0 03 shl $0x3,%eax 7ba: 89 04 24 mov %eax,(%esp) 7bd: e8 10 fc ff ff call 3d2 <sbrk> 7c2: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 7c5: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 7c9: 75 07 jne 7d2 <morecore+0x34> return 0; 7cb: b8 00 00 00 00 mov $0x0,%eax 7d0: eb 22 jmp 7f4 <morecore+0x56> hp = (Header*)p; 7d2: 8b 45 f4 mov -0xc(%ebp),%eax 7d5: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 7d8: 8b 45 f0 mov -0x10(%ebp),%eax 7db: 8b 55 08 mov 0x8(%ebp),%edx 7de: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 7e1: 8b 45 f0 mov -0x10(%ebp),%eax 7e4: 83 c0 08 add $0x8,%eax 7e7: 89 04 24 mov %eax,(%esp) 7ea: e8 ce fe ff ff call 6bd <free> return freep; 7ef: a1 ac 0b 00 00 mov 0xbac,%eax } 7f4: c9 leave 7f5: c3 ret 000007f6 <malloc>: void* malloc(uint nbytes) { 7f6: 55 push %ebp 7f7: 89 e5 mov %esp,%ebp 7f9: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 7fc: 8b 45 08 mov 0x8(%ebp),%eax 7ff: 83 c0 07 add $0x7,%eax 802: c1 e8 03 shr $0x3,%eax 805: 83 c0 01 add $0x1,%eax 808: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 80b: a1 ac 0b 00 00 mov 0xbac,%eax 810: 89 45 f0 mov %eax,-0x10(%ebp) 813: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 817: 75 23 jne 83c <malloc+0x46> base.s.ptr = freep = prevp = &base; 819: c7 45 f0 a4 0b 00 00 movl $0xba4,-0x10(%ebp) 820: 8b 45 f0 mov -0x10(%ebp),%eax 823: a3 ac 0b 00 00 mov %eax,0xbac 828: a1 ac 0b 00 00 mov 0xbac,%eax 82d: a3 a4 0b 00 00 mov %eax,0xba4 base.s.size = 0; 832: c7 05 a8 0b 00 00 00 movl $0x0,0xba8 839: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 83c: 8b 45 f0 mov -0x10(%ebp),%eax 83f: 8b 00 mov (%eax),%eax 841: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 844: 8b 45 f4 mov -0xc(%ebp),%eax 847: 8b 40 04 mov 0x4(%eax),%eax 84a: 3b 45 ec cmp -0x14(%ebp),%eax 84d: 72 4d jb 89c <malloc+0xa6> if(p->s.size == nunits) 84f: 8b 45 f4 mov -0xc(%ebp),%eax 852: 8b 40 04 mov 0x4(%eax),%eax 855: 3b 45 ec cmp -0x14(%ebp),%eax 858: 75 0c jne 866 <malloc+0x70> prevp->s.ptr = p->s.ptr; 85a: 8b 45 f4 mov -0xc(%ebp),%eax 85d: 8b 10 mov (%eax),%edx 85f: 8b 45 f0 mov -0x10(%ebp),%eax 862: 89 10 mov %edx,(%eax) 864: eb 26 jmp 88c <malloc+0x96> else { p->s.size -= nunits; 866: 8b 45 f4 mov -0xc(%ebp),%eax 869: 8b 40 04 mov 0x4(%eax),%eax 86c: 2b 45 ec sub -0x14(%ebp),%eax 86f: 89 c2 mov %eax,%edx 871: 8b 45 f4 mov -0xc(%ebp),%eax 874: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 877: 8b 45 f4 mov -0xc(%ebp),%eax 87a: 8b 40 04 mov 0x4(%eax),%eax 87d: c1 e0 03 shl $0x3,%eax 880: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 883: 8b 45 f4 mov -0xc(%ebp),%eax 886: 8b 55 ec mov -0x14(%ebp),%edx 889: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 88c: 8b 45 f0 mov -0x10(%ebp),%eax 88f: a3 ac 0b 00 00 mov %eax,0xbac return (void*)(p + 1); 894: 8b 45 f4 mov -0xc(%ebp),%eax 897: 83 c0 08 add $0x8,%eax 89a: eb 38 jmp 8d4 <malloc+0xde> } if(p == freep) 89c: a1 ac 0b 00 00 mov 0xbac,%eax 8a1: 39 45 f4 cmp %eax,-0xc(%ebp) 8a4: 75 1b jne 8c1 <malloc+0xcb> if((p = morecore(nunits)) == 0) 8a6: 8b 45 ec mov -0x14(%ebp),%eax 8a9: 89 04 24 mov %eax,(%esp) 8ac: e8 ed fe ff ff call 79e <morecore> 8b1: 89 45 f4 mov %eax,-0xc(%ebp) 8b4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8b8: 75 07 jne 8c1 <malloc+0xcb> return 0; 8ba: b8 00 00 00 00 mov $0x0,%eax 8bf: eb 13 jmp 8d4 <malloc+0xde> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 8c1: 8b 45 f4 mov -0xc(%ebp),%eax 8c4: 89 45 f0 mov %eax,-0x10(%ebp) 8c7: 8b 45 f4 mov -0xc(%ebp),%eax 8ca: 8b 00 mov (%eax),%eax 8cc: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 8cf: e9 70 ff ff ff jmp 844 <malloc+0x4e> } 8d4: c9 leave 8d5: c3 ret
programs/oeis/323/A323170.asm
neoneye/loda
22
244106
<gh_stars>10-100 ; A323170: a(n) = 1 if (2*phi(n)) < n, 0 otherwise, where phi is Euler totient function (A000010). ; 0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 mov $2,$0 seq $2,10 ; Euler totient function phi(n): count numbers <= n and prime to n. lpb $0 add $1,1 mul $2,2 mov $0,$2 lpe mov $0,$1
line.asm
peckhamdata/cgl-6502
4
175126
steep: .byte $00 x0: .byte $01 y0: .byte $02 x1: .byte $0a y1: .byte $0e delta_x: .byte $00 delta_y: .byte $00 error: .byte $00 y: .byte $00 y_step: .byte $00 xtmp: .byte $00 line_delay: .byte $0c line_delay_inner: .byte $ff plot_line: txa pha tya pha lda y0 sta y0 clc ldx x0 !loop: tya pha ldy line_delay !loop_i: beq !next+ tya pha ldy line_delay_inner !loop_ii: dey bne !loop_ii- pla tay dey jmp !loop_i- !next: pla tay lda steep cmp #$01 bne !next+ lda y // Plot y,x sta p0 stx p1 jsr plot_point jmp !done+ !next: stx p0 // Plot x,y lda y sta p1 jsr plot_point !done: sec lda error sbc delta_y sta error bmi !lt+ jmp !next+ !lt: lda y clc adc y_step sta y lda error clc adc delta_x sta error !next: inx cpx x1 bne !loop- pla tay pla tax lda #$00 sta steep rts init_line: txa pha tya pha clc lda x1 sec sbc x0 bpl !next+ eor #$ff clc adc #$01 !next: sta xtmp lda y1 sec sbc y0 bpl !next+ eor #$ff clc adc #$01 !next: cmp xtmp beq !swap+ bcs !swap+ jmp !next+ !swap: lda #$01 sta steep lda y0 pha lda x0 sta y0 pla sta x0 lda y1 pha lda x1 sta y1 pla sta x1 !next: lda x0 cmp x1 beq !cont+ bcs !cont+ jmp !next+ !cont: lda x0 pha lda x1 sta x0 pla sta x1 lda y0 pha lda y1 sta y0 pla sta y1 !next: sec lda x1 sbc x0 sta delta_x sec lda y1 sbc y0 bpl !next+ eor #$ff clc adc #$01 !next: sta delta_y lda delta_x lsr sta error lda y0 sta y cmp y1 bcc !else+ lda #$ff sta y_step jmp !next+ !else: lda #$01 sta y_step !next: pla tay pla tax rts
src/ada/src/uxas-messages-lmcptask-uniqueautomationrequest-spark_boundary.ads
pat-rogers/OpenUxAS
0
8686
<reponame>pat-rogers/OpenUxAS<filename>src/ada/src/uxas-messages-lmcptask-uniqueautomationrequest-spark_boundary.ads with Common_Formal_Containers; use Common_Formal_Containers; with afrl.cmasi.AutomationRequest.SPARK_Boundary; use afrl.cmasi.AutomationRequest.SPARK_Boundary; with afrl.impact.ImpactAutomationRequest; use afrl.impact.ImpactAutomationRequest; with afrl.impact.ImpactAutomationRequest.SPARK_Boundary; use afrl.impact.ImpactAutomationRequest.SPARK_Boundary; with avtas.lmcp.object.SPARK_Boundary; use avtas.lmcp.object.SPARK_Boundary; with uxas.messages.lmcptask.TaskAutomationRequest; use uxas.messages.lmcptask.TaskAutomationRequest; with uxas.messages.lmcptask.TaskAutomationRequest.SPARK_Boundary; use uxas.messages.lmcptask.TaskAutomationRequest.SPARK_Boundary; package UxAS.Messages.LmcpTask.UniqueAutomationRequest.SPARK_Boundary with SPARK_Mode is pragma Annotate (GNATprove, Terminating, SPARK_Boundary); -- This package introduces a wrapper around UniqueAutomationRequest. -- UniqueAutomationRequest is a private type, so it can be used in SPARK. -- This wrapper is only used to introduce contracts on the type and -- its accessors. use all type Int64_Vect; type My_UniqueAutomationRequest is private with Default_Initial_Condition => Int64_Vects.Is_Empty (Get_PlanningStates_Ids (My_UniqueAutomationRequest)); function Get_EntityList_From_OriginalRequest (Request : My_UniqueAutomationRequest) return Int64_Vect with Global => null; function Get_OperatingRegion_From_OriginalRequest (Request : My_UniqueAutomationRequest) return Int64 with Global => null; function Get_PlanningStates_Ids (Request : My_UniqueAutomationRequest) return Int64_Vect with Global => null; function getRequestID (this : My_UniqueAutomationRequest) return Int64 with Global => null; function Get_TaskList_From_OriginalRequest (Request : My_UniqueAutomationRequest) return Int64_Vect with Global => null; function Same_Requests (X, Y : My_UniqueAutomationRequest) return Boolean is (Get_PlanningStates_Ids (X) = Get_PlanningStates_Ids (Y) and Get_EntityList_From_OriginalRequest (X) = Get_EntityList_From_OriginalRequest (Y) and Get_OperatingRegion_From_OriginalRequest (X) = Get_OperatingRegion_From_OriginalRequest (Y) and Get_TaskList_From_OriginalRequest (X) = Get_TaskList_From_OriginalRequest (Y)); pragma Annotate (GNATprove, Inline_For_Proof, Same_Requests); overriding function "=" (X, Y : My_UniqueAutomationRequest) return Boolean with Global => null, Post => (if "="'Result then Same_Requests (X, Y)); procedure Copy_PlanningState_From_TaskAutomationRequest (Target : in out My_UniqueAutomationRequest; Source : uxas.messages.lmcptask.TaskAutomationRequest.TaskAutomationRequest) with Global => null, Post => Get_PlanningStates_Ids (Target) = Get_PlanningStates_Ids (Source) and Get_EntityList_From_OriginalRequest (Target) = Get_EntityList_From_OriginalRequest (Target)'Old and Get_OperatingRegion_From_OriginalRequest (Target) = Get_OperatingRegion_From_OriginalRequest (Target)'Old and Get_TaskList_From_OriginalRequest (Target) = Get_TaskList_From_OriginalRequest (Target)'Old; procedure Copy_OriginalRequest_From_ImpactAutomationRequest (Target : in out My_UniqueAutomationRequest; Source : ImpactAutomationRequest) with Global => null, Post => Get_EntityList_From_OriginalRequest (Target) = Get_EntityList_From_TrialRequest (Source) and Get_OperatingRegion_From_OriginalRequest (Target) = Get_OperatingRegion_From_TrialRequest (Source) and Get_TaskList_From_OriginalRequest (Target) = Get_TaskList_From_TrialRequest (Source) and Get_PlanningStates_Ids (Target) = Get_PlanningStates_Ids (Target)'Old; procedure Copy_OriginalRequest_From_AutomationRequest (Target : in out My_UniqueAutomationRequest; Source : My_Object_Any) with Global => null, Pre => Deref (Source) in AutomationRequest, Post => Get_EntityList_From_OriginalRequest (Target) = Get_EntityList (AutomationRequest (Deref (Source))) and Get_OperatingRegion_From_OriginalRequest (Target) = Get_OperatingRegion (AutomationRequest (Deref (Source))) and Get_TaskList_From_OriginalRequest (Target) = Get_TaskList (AutomationRequest (Deref (Source))) and Get_PlanningStates_Ids (Target) = Get_PlanningStates_Ids (Target)'Old; procedure Copy_OriginalRequest_From_TaskAutomationRequest (Target : in out My_UniqueAutomationRequest; Source : uxas.messages.lmcptask.TaskAutomationRequest.TaskAutomationRequest) with Global => null, Post => Get_EntityList_From_OriginalRequest (Target) = Get_EntityList_From_OriginalRequest (Source) and Get_OperatingRegion_From_OriginalRequest (Target) = Get_OperatingRegion_From_OriginalRequest (Source) and Get_TaskList_From_OriginalRequest (Target) = Get_TaskList_From_OriginalRequest (Source) and Get_PlanningStates_Ids (Target) = Get_PlanningStates_Ids (Target)'Old; procedure setRequestID (this : in out My_UniqueAutomationRequest; RequestID : in Int64) with Global => null, Post => getRequestID (This) = RequestID and Get_EntityList_From_OriginalRequest (This) = Get_EntityList_From_OriginalRequest (This)'Old and Get_PlanningStates_Ids (This) = Get_PlanningStates_Ids (This)'Old and Get_OperatingRegion_From_OriginalRequest (This) = Get_OperatingRegion_From_OriginalRequest (This)'Old and Get_TaskList_From_OriginalRequest (This) = Get_TaskList_From_OriginalRequest (This)'Old; procedure setSandBoxRequest (this : in out My_UniqueAutomationRequest; SandBoxRequest : Boolean) with Global => null, Post => Get_EntityList_From_OriginalRequest (This) = Get_EntityList_From_OriginalRequest (This)'Old and Get_PlanningStates_Ids (This) = Get_PlanningStates_Ids (This)'Old and Get_OperatingRegion_From_OriginalRequest (This) = Get_OperatingRegion_From_OriginalRequest (This)'Old and Get_TaskList_From_OriginalRequest (This) = Get_TaskList_From_OriginalRequest (This)'Old; -- Simple renaming to add a contract function Unwrap (this : My_UniqueAutomationRequest) return UniqueAutomationRequest; function Wrap (this : UniqueAutomationRequest) return My_UniqueAutomationRequest; private pragma SPARK_Mode (Off); type My_UniqueAutomationRequest is record Content : UniqueAutomationRequest; end record; overriding function "=" (X, Y : My_UniqueAutomationRequest) return Boolean is (X.Content = Y.Content); function getRequestID (this : My_UniqueAutomationRequest) return Int64 is (this.Content.getRequestID); function Unwrap (this : My_UniqueAutomationRequest) return UniqueAutomationRequest is (this.Content); function Wrap (this : UniqueAutomationRequest) return My_UniqueAutomationRequest is (Content => this); end UxAS.Messages.LmcpTask.UniqueAutomationRequest.SPARK_Boundary;
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cc/cc1311b.ada
best08618/asylo
7
12944
<gh_stars>1-10 -- CC1311B.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT IF PARAMETERS OF DEFAULT AND FORMAL SUBPROGRAMS HAVE -- THE SAME TYPE BUT NOT THE SAME SUBTYPE, THE PARAMETER SUBTYPES OF -- THE SUBPROGRAM DENOTED BY THE DEFAULT ARE USED INSTEAD OF -- SUBTYPES SPECIFIED IN THE FORMAL SUBPROGRAM DECLARATION. -- HISTORY: -- RJW 06/11/86 CREATED ORIGINAL TEST. -- DHH 10/20/86 CORRECTED RANGE ERRORS. -- PWN 01/31/95 REMOVED INCONSISTENCIES WITH ADA 9X. -- PWN 10/27/95 REMOVED CHECKS AGAINST ARRAY SLIDING RULES THAT -- HAVE BEEN RELAXED. -- PWN 10/25/96 RESTORED CHECKS WITH NEW ADA 95 EXPECTED RESULTS. WITH REPORT; USE REPORT; PROCEDURE CC1311B IS BEGIN TEST ("CC1311B", "CHECK THAT IF PARAMETERS OF DEFAULT AND " & "FORMAL SUBPROGRAMS HAVE THE SAME TYPE BUT " & "NOT THE SAME SUBTYPE, THE PARAMETER SUBTYPES " & "OF THE SUBPROGRAM DENOTED BY THE DEFAULT ARE " & "USED INSTEAD OF SUBTYPES SPECIFIED IN THE " & "FORMAL SUBPROGRAM DECLARATION" ); DECLARE TYPE NUMBERS IS (ZERO, ONE ,TWO); SUBTYPE ZERO_TWO IS NUMBERS; SUBTYPE ZERO_ONE IS NUMBERS RANGE ZERO .. ONE; FUNCTION FSUB (X : ZERO_ONE) RETURN ZERO_ONE IS BEGIN RETURN NUMBERS'VAL (IDENT_INT (NUMBERS'POS (ONE))); END FSUB; GENERIC WITH FUNCTION F (X : ZERO_TWO := TWO) RETURN ZERO_TWO IS FSUB; FUNCTION FUNC RETURN ZERO_TWO; FUNCTION FUNC RETURN ZERO_TWO IS BEGIN RETURN F; EXCEPTION WHEN CONSTRAINT_ERROR => RETURN ZERO; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "NFUNC1" ); RETURN ZERO; END FUNC; FUNCTION NFUNC1 IS NEW FUNC; BEGIN IF NFUNC1 = ONE THEN FAILED ( "NO EXCEPTION RAISED WITH NFUNC1" ); END IF; END; DECLARE TYPE GENDER IS (MALE, FEMALE); TYPE PERSON (SEX : GENDER) IS RECORD CASE SEX IS WHEN MALE => BEARDED : BOOLEAN; WHEN FEMALE => CHILDREN : INTEGER; END CASE; END RECORD; SUBTYPE MAN IS PERSON (SEX => MALE); SUBTYPE TESTWRITER IS PERSON (FEMALE); ROSA : TESTWRITER := (FEMALE, 4); FUNCTION F (X : MAN) RETURN PERSON IS TOM : PERSON (MALE) := (MALE, FALSE); BEGIN IF EQUAL (3, 3) THEN RETURN X; ELSE RETURN TOM; END IF; END F; GENERIC TYPE T IS PRIVATE; X1 : T; WITH FUNCTION F (X : T) RETURN T IS <> ; PACKAGE PKG IS END PKG; PACKAGE BODY PKG IS BEGIN IF F(X1) = X1 THEN FAILED ( "NO EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PACKAGE " & "'PKG' - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PACKAGE " & "'PKG' - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PACKAGE 'PKG'" ); END PKG; PACKAGE NPKG IS NEW PKG (TESTWRITER, ROSA); BEGIN COMMENT ( "PACKAGE BODY ELABORATED - 1" ); END; DECLARE TYPE VECTOR IS ARRAY (POSITIVE RANGE <>) OF INTEGER; SUBTYPE SUBV1 IS VECTOR (1 .. 5); SUBTYPE SUBV2 IS VECTOR (2 .. 6); V1 : SUBV1 := (1, 2, 3, 4, 5); FUNCTION FSUB (Y : SUBV2) RETURN VECTOR IS Z : SUBV2; BEGIN FOR I IN Y'RANGE LOOP Z (I) := IDENT_INT (Y (I)); END LOOP; RETURN Z; END; GENERIC WITH FUNCTION F (X : SUBV1 := V1) RETURN SUBV1 IS FSUB; PROCEDURE PROC; PROCEDURE PROC IS BEGIN IF F = V1 THEN COMMENT ( "NO EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PROCEDURE " & "'PROC' - 1" ); ELSE COMMENT ( "NO EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PROCEDURE " & "'PROC' - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED WITH " & "FUNCTION 'F' AND PROCEDURE " & "'PROC'" ); WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "FUNCTION 'F' AND PROCEDURE " & "'PROC'" ); END PROC; PROCEDURE NPROC IS NEW PROC; BEGIN NPROC; END; DECLARE TYPE ACC IS ACCESS STRING; SUBTYPE INDEX1 IS INTEGER RANGE 1 .. 5; SUBTYPE INDEX2 IS INTEGER RANGE 2 .. 6; SUBTYPE ACC1 IS ACC (INDEX1); SUBTYPE ACC2 IS ACC (INDEX2); AC2 : ACC2 := NEW STRING'(2 .. 6 => 'A'); AC : ACC; PROCEDURE P (RESULTS : OUT ACC1; X : ACC1) IS BEGIN RESULTS := NULL; END P; GENERIC WITH PROCEDURE P1 (RESULTS : OUT ACC2; X : ACC2 := AC2) IS P; FUNCTION FUNC RETURN ACC; FUNCTION FUNC RETURN ACC IS RESULTS : ACC; BEGIN P1 (RESULTS); RETURN RESULTS; EXCEPTION WHEN CONSTRAINT_ERROR => RETURN NEW STRING'("ABCDE"); WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "NFUNC2" ); RETURN NULL; END FUNC; FUNCTION NFUNC2 IS NEW FUNC; BEGIN AC := NFUNC2; IF AC = NULL OR ELSE AC.ALL /= "ABCDE" THEN FAILED ( "NO OR WRONG EXCEPTION RAISED WITH NFUNC2" ); END IF; END; DECLARE SUBTYPE FLOAT1 IS FLOAT RANGE -1.0 .. 0.0; SUBTYPE FLOAT2 IS FLOAT RANGE 0.0 .. 1.0; PROCEDURE PSUB (RESULTS : OUT FLOAT2; X : FLOAT2) IS BEGIN IF EQUAL (3, 3) THEN RESULTS := X; ELSE RESULTS := 0.0; END IF; END PSUB; GENERIC WITH PROCEDURE P (RESULTS : OUT FLOAT1; X : FLOAT1 := -0.0625) IS PSUB; PACKAGE PKG IS END PKG; PACKAGE BODY PKG IS RESULTS : FLOAT1; BEGIN P (RESULTS); IF RESULTS = 1.0 THEN FAILED ( "NO EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PACKAGE " & "'PKG' - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PACKAGE " & "'PKG' - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PACKAGE 'PKG'" ); END PKG; PACKAGE NPKG IS NEW PKG; BEGIN COMMENT ( "PACKAGE BODY ELABORATED - 2" ); END; DECLARE TYPE FIXED IS DELTA 0.125 RANGE -1.0 .. 1.0; SUBTYPE FIXED1 IS FIXED RANGE -0.5 .. 0.0; SUBTYPE FIXED2 IS FIXED RANGE 0.0 .. 0.5; PROCEDURE P (RESULTS : OUT FIXED1; X : FIXED1) IS BEGIN IF EQUAL (3, 3) THEN RESULTS := X; ELSE RESULTS := X; END IF; END P; GENERIC TYPE F IS DELTA <>; F1 : F; WITH PROCEDURE P (RESULTS : OUT F; X : F) IS <> ; PROCEDURE PROC; PROCEDURE PROC IS RESULTS : F; BEGIN P (RESULTS, F1); IF RESULTS = 0.0 THEN FAILED ( "NO EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PROCEDURE " & "'PROC' - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PROCEDURE " & "'PROC' - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED WITH " & "PROCEDURE 'P' AND PROCEDURE " & "'PROC'" ); END PROC; PROCEDURE NPROC IS NEW PROC (FIXED2, 0.125); BEGIN NPROC; END; RESULT; END CC1311B;
LAB 4/Lab4Task1.asm
smellycattt/Microprocessor-Programming
1
9922
<reponame>smellycattt/Microprocessor-Programming .Model Tiny .386 .DATA FILE DB 'ABCD.txt',0 MYNAME DB 'Shivankit' NEWLINE DB 0DH, 0AH IDNO DB '2015A7PS076P' NEWLINE2 DB 0DH, 0AH .CODE .Startup ;CREATING THE FILE MOV AH, 3CH LEA DX, FILE MOV CL, 2; INT 21H ;OPENING THE FILE LEA DX, FILE MOV AH, 3DH MOV AL, 02H INT 21H ;WRITING DATA INTO THE FILE MOV BX,AX ;TRANSFERRING THE FILE HANDLE MOV AH, 40H MOV CX, 25 LEA DX, MYNAME INT 21H ;CLOSING THE FILE MOV AH, 3EH INT 21H .EXIT END
examples/outdated-and-incorrect/iird/LF.agda
asr/agda-kanso
1
3014
module LF where data Zero : Set where record One : Set where ★ : One ★ = record {} One-elim : (C : One -> Set) -> C ★ -> (a : One) -> C a One-elim C h _ = h One-elim₁ : (C : One -> Set1) -> C ★ -> (a : One) -> C a One-elim₁ C h _ = h -- data One' : Set1 where -- ★' : One' data Two : Set where ★₀ : Two ★₁ : Two case₂ : {A : Set1} -> Two -> A -> A -> A case₂ ★₀ x y = x case₂ ★₁ x y = y data _+_ (A : Set)(B : Set) : Set where inl : A -> A + B inr : B -> A + B record _×_ (A : Set)(B : A -> Set) : Set where field π₀ : A π₁ : B π₀ open _×_ public _,_ : {A : Set}{B : A -> Set}(a : A) -> B a -> A × B x , y = record { π₀ = x; π₁ = y } _*_ : (A B : Set) -> Set A * B = A × \_ -> B -- data _×'_ (A : Set)(B : A -> Set1) : Set1 where -- _,'_ : (a : A) -> B a -> A ×' B -- -- π₀' : {A : Set}{B : A -> Set1} -> A ×' B -> A -- π₀' (a ,' b) = a -- -- π₁' : {A : Set}{B : A -> Set1}(p : A ×' B) -> B (π₀' p) -- π₁' (a ,' b) = b
xt_lite_tft/test1/SW/BIOSLITE2MB_BRAM/BootLoader/bootstrap.asm
yomboprime/zxuno-addons
3
83567
; This file is part of the Next186 SoC PC project ; http://opencores.org/project,next186 ; Filename: bootstrap.asm ; Description: Part of the Next186 SoC PC project, bootstrap "ROM" code (RAM initialized with cache) ; Version 1.0 ; Creation date: Jun2013 ; Author: <NAME> ; e-mail: <EMAIL> ; ------------------------------------------------------------------------------------- ; Copyright (C) 2013 <NAME> ; This source file may be used and distributed without ; restriction provided that this copyright statement is not ; removed from the file and that any derivative work contains ; the original copyright notice and the associated disclaimer. ; This source file is free software; you can redistribute it ; and/or modify it under the terms of the GNU Lesser General ; Public License as published by the Free Software Foundation; ; either version 2.1 of the License, or (at your option) any ; later version. ; This source is distributed in the hope that it will be ; useful, but WITHOUT ANY WARRANTY; without even the implied ; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ; PURPOSE. See the GNU Lesser General Public License for more ; details. ; You should have received a copy of the GNU Lesser General ; Public License along with this source; if not, download it ; from http://www.opencores.org/lgpl.shtml ; ----------------------------------------------------------------------- ; Additional Comments: ; Assembled with MASM v6.14.8444 ; No hardware resources are required for the bootstrap ROM, I use only the initial value of the cache memory ; BIOS will be read from the last BIOSSIZE sectors of SD Card and placed in DRAM at F000:(-BIOSSIZE*512) ; SD HC card required .186 .model tiny .code BIOSSIZE EQU 16 ; sectors BOOTOFFSET EQU 0fc00h ; bootstrap code offset in segment 0f000h ; this code is for bootstrap deployment only, it will not be present in ROM (cache) ;---------------- EXECUTE ----------------- org 100h ; this code is loaded at 0f000h:100h exec label near mov si, begin mov di, BOOTOFFSET mov cx, 256*4/2 ; last 4 cache lines (from total 8) rep movsw db 0eah dw 0, -1 ; CPU reset, execute bootstrap ; Loads BIOS (8K = 16 sectors) from last sectors of SD card (if present) ; If no SD card detected, wait on RS232 115200bps and load program at F000:100h ; the following code is placed in the last 1kB of cache (last 4 lines), each with the dirty bit set ; the corresponding position in RAM will be F000:BOOTOFFSET ; ----------------- RS232 bootstrap - last 256byte cache line --------------- org 200h begin label far ; this code is placed at F000:BOOTOFFSET cli cld mov ax, cs ; cs = 0f000h mov ds, ax mov es, ax mov ss, ax mov sp, BOOTOFFSET xor ax, ax ; map seg0 out 80h, ax mov al, 0bh ; map text segB out 8bh, ax mov al, 15h ; map ROM segF out 8fh, ax mov al, 34h out 43h, al xor al, al out 40h, al out 40h, al ; program PIT for RS232 ; call sdinit_ ; test ax, ax ; jz short RS232 push 0a000h pop ds xor si, si ; push 0e000h ; pop di xor di, di mov cx, 1000h rep movsw mov cx, es mov ds, cx mov bx, 2000h cmp word ptr ds:[0], 'eN' jne short sdbios call sdinit_ jmp short lastcheck sdbios: call sdinit_ test ax, ax jz short RS232 mov dx, ax shr dx, 6 shl ax, 10 mov cx, BIOSSIZE ; sectors sub ax, cx sbb dx, 0 xor bx, bx ; read BIOSSIZE/2 KB BIOS at 0f000h:0h nextsect: push ax push dx push cx call sdread_ dec cx pop cx pop dx pop ax jnz short RS232 ; cx was not 1 add ax, 1 adc dx, 0 add bx, 512 loop nextsect cmp word ptr ds:[0], 'eN' jne short RS232 lastcheck: cmp word ptr ds:[2], 'tx' je short BIOSOK RS232: mov dx, 3c0h mov al, 10h out dx, al mov al, 8h out dx, al ; set text mode mov dx, 3d4h mov al, 0ah out dx, al inc dx mov al, 1 shl 5 ; hide cursor out dx, al dec dx mov al, 0ch out dx, al inc dx mov al, 0 out dx, al dec dx mov al, 0dh out dx, al inc dx mov al, 0 out dx, al ; reset video offset push 0b800h ; clear screen pop es xor di, di mov cx, 25*80 xor ax, ax rep stosw mov dx, 3c8h ; set palette entry 1 mov ax, 101h out dx, al inc dx mov al, 2ah out dx, al out dx, al out dx, al xor di, di mov si, booterrmsg + BOOTOFFSET - begin lodsb nextchar: stosw lodsb test al, al jnz short nextchar mov bh, 8 flush: mov al, [bx] dec bh jnz flush mov si, 100h call srecb mov bh, ah call srecb mov bl, ah sloop: call srecb mov [si], ah inc si dec bx jnz sloop xor sp, sp mov ss, sp db 0eah dw 100h,0f000h ; execute loaded program BIOSOK: mov si, reloc + BOOTOFFSET - begin mov di, bx mov cx, endreloc - reloc rep movsb ; relocate code from reloc to endreloc after loaded BIOS mov di, -BIOSSIZE*512 xor si, si mov cx, BIOSSIZE*512/2 jmp bx reloc: rep movsw db 0eah dw 0, -1 ; CPU reset, execute BIOS endreloc: ; ---------------- serial receive byte 115200 bps -------------- srecb: mov ah, 80h mov dx, 3dah mov cx, -5aeh ; (half start bit) srstb: in al, dx shr al, 2 jc srstb in al, 40h ; lo counter add ch, al in al, 40h ; hi counter, ignore l1: call dlybit in al, dx shr al, 2 rcr ah, 1 jnc l1 dlybit: sub cx, 0a5bh ; (full bit) dly1: in al, 40h cmp al, ch in al, 40h jnz dly1 ret ;--------------------- read/write byte ---------------------- sdrb: mov al, 0ffh sdsb: ; in AL=byte, DX = 03dah, out AX=result mov ah, 1 sdsb1: out dx, al add ax, ax jnc sdsb1 in ax, dx ret ;--------------------- write block ---------------------- sdwblk: ; in DS:SI=data ptr, DX=03dah, CX=size lodsb call sdsb loop sdwblk ret ;--------------------- read block ---------------------- sdrblk: ; in DS:DI=data ptr, DX=03dah, CX=size call sdrb mov [di], ah inc di loop sdrblk ret ;--------------------- write command ---------------------- sdcmd8T: call sdrb sdcmd: ; in DS:SI=6 bytes cmd buffer, DX=03dah, out AH = 0ffh on error mov cx, 6 call sdwblk sdresp: xor si, si sdresp1: call sdrb inc si jz sdcmd1 cmp ah, 0ffh je sdresp1 sdcmd1: ret ;--------------------- read one sector ---------------------- sdread_ proc near ; DX:AX sector, DS:BX buffer, returns CX=read sectors push ax mov al, dl push ax mov dl, 51h ; CMD17 push dx mov si, sp mov dx, 3dah mov ah, 1 out dx, ax ; CS on call sdcmd add sp, 6 or ah, ah jnz sdr1 ; error (cx=0) call sdresp ; wait for 0feh token cmp ah, 0feh jne sdr1 ; read token error (cx=0) mov ch, 2 ; 512 bytes mov di, bx call sdrblk call sdrb ; ignore CRC call sdrb ; ignore CRC inc cx ; 1 block sdr1: xor ax, ax out dx, ax call sdrb ; 8T ret sdread_ endp ;--------------------- init SD ---------------------- sdinit_ proc near ; returns AX = num kilosectors mov dx, 3dah mov cx, 10 sdinit1: ; send 80T call sdrb loop sdinit1 mov ah, 1 out dx, ax ; select SD mov si, SD_CMD0 + BOOTOFFSET - begin call sdcmd dec ah jnz sdexit ; error mov si, SD_CMD8 + BOOTOFFSET - begin call sdcmd8T dec ah jnz sdexit ; error mov cl, 4 sub sp, cx mov di, sp call sdrblk pop ax pop ax cmp ah, 0aah jne sdexit ; CMD8 error repinit: mov si, SD_CMD55 + BOOTOFFSET - begin call sdcmd8T call sdrb mov si, SD_CMD41 + BOOTOFFSET - begin call sdcmd dec ah jz repinit mov si, SD_CMD58 + BOOTOFFSET - begin call sdcmd8T mov cl, 4 sub sp, cx mov di, sp call sdrblk pop ax test al, 40h ; test OCR bit 30 (CCS) pop ax jz sdexit ; no SDHC mov si, SD_CMD9 + BOOTOFFSET - begin ; get size info call sdcmd8T or ah, ah jnz sdexit call sdresp ; wait for 0feh token cmp ah, 0feh jne sdexit mov cl, 18 ; 16bytes + 2bytes CRC sub sp, cx mov di, sp call sdrblk mov cx, [di-10] xchg cl, ch inc cx mov sp, di sdexit: xor ax, ax ; raise CS out dx, ax call sdrb mov ax, cx ret sdinit_ endp booterrmsg db 'BIOS not present on SDCard last 8KB, waiting on RS232 (115200bps, f000:100) ...', 0 SD_CMD0 db 40h, 0, 0, 0, 0, 95h SD_CMD8 db 48h, 0, 0, 1, 0aah, 087h SD_CMD9 db 49h, 0, 0, 0, 0, 0ffh SD_CMD41 db 69h, 40h, 0, 0, 0, 0ffh SD_CMD55 db 77h, 0, 0, 0, 0, 0ffh SD_CMD58 db 7ah, 0, 0, 0, 0, 0ffh ; ---------------- RESET ------------------ org 05f0h start: db 0eah dw BOOTOFFSET, 0f000h db 0,0,0,0,0,0,0,0,0,0,0 end exec
llvm-gcc-4.2-2.9/gcc/ada/s-wchstw.adb
vidkidz/crossbridge
1
4632
<filename>llvm-gcc-4.2-2.9/gcc/ada/s-wchstw.adb ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W C H _ S T W -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.WCh_Con; use System.WCh_Con; with System.WCh_Cnv; use System.WCh_Cnv; package body System.WCh_StW is ----------------------- -- Local Subprograms -- ----------------------- procedure Get_Next_Code (S : String; P : in out Natural; V : out UTF_32_Code; EM : WC_Encoding_Method); -- Scans next character starting at S(P) and returns its value in V. On -- exit P is updated past the last character read. Raises Constraint_Error -- if the string is not well formed. Raises Constraint_Error if the code -- value is greater than 16#7FFF_FFFF#. On entry P <= S'Last. ------------------- -- Get_Next_Code -- ------------------- procedure Get_Next_Code (S : String; P : in out Natural; V : out UTF_32_Code; EM : WC_Encoding_Method) is function In_Char return Character; -- Function to return a character, bumping P, raises Constraint_Error -- if P > S'Last on entry. function Get_UTF_32 is new Char_Sequence_To_UTF_32 (In_Char); -- Function to get next UFT_32 value ------------- -- In_Char -- ------------- function In_Char return Character is begin if P > S'Last then raise Constraint_Error; else P := P + 1; return S (P - 1); end if; end In_Char; -- Start of processing for Get_Next_Code begin -- Check for wide character encoding case EM is when WCEM_Hex => if S (P) = ASCII.ESC then V := Get_UTF_32 (In_Char, EM); return; end if; when WCEM_Upper | WCEM_Shift_JIS | WCEM_EUC | WCEM_UTF8 => if S (P) >= Character'Val (16#80#) then V := Get_UTF_32 (In_Char, EM); return; end if; when WCEM_Brackets => if P + 2 <= S'Last and then S (P) = '[' and then S (P + 1) = '"' and then S (P + 2) /= '"' then V := Get_UTF_32 (In_Char, EM); return; end if; end case; -- If it is not a wide character code, just get it V := Character'Pos (S (P)); P := P + 1; end Get_Next_Code; --------------------------- -- String_To_Wide_String -- --------------------------- function String_To_Wide_String (S : String; EM : WC_Encoding_Method) return Wide_String is R : Wide_String (1 .. S'Length); RP : Natural; SP : Natural; V : UTF_32_Code; begin SP := S'First; RP := 0; while SP <= S'Last loop Get_Next_Code (S, SP, V, EM); if V > 16#FFFF# then raise Constraint_Error; end if; RP := RP + 1; R (RP) := Wide_Character'Val (V); end loop; return R (1 .. RP); end String_To_Wide_String; -------------------------------- -- String_To_Wide_Wide_String -- -------------------------------- function String_To_Wide_Wide_String (S : String; EM : WC_Encoding_Method) return Wide_Wide_String is R : Wide_Wide_String (1 .. S'Length); RP : Natural; SP : Natural; V : UTF_32_Code; begin SP := S'First; RP := 0; while SP <= S'Last loop Get_Next_Code (S, SP, V, EM); RP := RP + 1; R (RP) := Wide_Wide_Character'Val (V); end loop; return R (1 .. RP); end String_To_Wide_Wide_String; end System.WCh_StW;
Modules/Module2/4_LogicalOperations/logicalops_rformat.asm
hackettccp/CSCI213
0
95207
<filename>Modules/Module2/4_LogicalOperations/logicalops_rformat.asm #Performs logical operations #Run and look at the $t0, $t1, $t2, $t3, $t4, $t5 registers li $t0, 0xad #Loads the constant 0xad (10101101) to $t0 li $t1, 0x1e #Loads the constant 0x1e (00011110) to $t1 and $t2, $t0, $t1 #$t2 = $t0 AND $t1 # $t0 = 10101101 # $t1 = 00011110 # $t2 = 00001100 = 0x0c or $t3, $t0, $t1 #$t3 = $t0 OR $t1 # $t0 = 10101101 # $t1 = 00011110 # $t3 = 10111111 = 0xbf xor $t4, $t0, $t1 #$t4 = $t0 XOR $t1 # $t0 = 10101101 # $t1 = 00011110 # $t4 = 10110011 = 0xb3 not $t5, $t0 #$t5 = NOT $t0 # $t0 = ...0000 10101101 # $t5 = ...1111 01010010 = 0x...ff52
server-core/src/main/java/io/onedev/server/buildspec/job/retrycondition/RetryCondition.g4
sasaie/onedev
7,137
2721
<gh_stars>1000+ grammar RetryCondition; condition : WS* (criteria|Never) WS* EOF ; criteria : criteriaField=Quoted WS+ operator=IsEmpty #FieldOperatorCriteria | criteriaField=Quoted WS+ operator=(Contains|Is) WS+ criteriaValue=Quoted #FieldOperatorValueCriteria | criteria WS+ And WS+ criteria #AndCriteria | criteria WS+ Or WS+ criteria #OrCriteria | Not WS* LParens WS* criteria WS* RParens #NotCriteria | LParens WS* criteria WS* RParens #ParensCriteria ; Never : 'never' ; Contains : 'contains' ; Is : 'is' ; IsEmpty : 'is' WS+ 'empty' ; And : 'and' ; Or : 'or' ; Not : 'not' ; LParens : '(' ; RParens : ')' ; Quoted : '"' ('\\'.|~[\\"])+? '"' ; WS : ' ' ; Identifier : [a-zA-Z0-9:_/\\+\-;]+ ;
snes/axelay/second-boss-behavior.asm
bskari/speedrun
1
27959
; Second boss behavior assembly ; 15c7 stores the 2nd boss's current action: ; 3 - loading offscreen ; 7 - loading offscreen ; 8 - standing up, chained ; 9 - walking backward after being unchained ; #$0a/11 - step 1? ; #$0b/12 - step? ; #$0f/15 - laser ; #$12/18 - step 2? ; #$13/19 - machine gun ; #$15/21 - firing bullets ; #$16/22 - death 1 ; #$17/23 - death 2 ; #$18/24 - death 3 C1/EAF2: A90C00 LDA #$000C C1/EAF5: 540001 MVN $00,$01 C1/EAF8: FA PLX C1/EAF9: AB PLB C1/EAFA: A90280 LDA #$8002 C1/EAFD: 853E STA $3E C1/EAFF: A90300 LDA #$0003 C1/EB02: 8DD200 STA $00D2 C1/EB05: B506 LDA $06,X ; 15be ? changes a lot C1/EB07: C90080 CMP #$8000 C1/EB0A: B016 BCS $EB22 C1/EB0C: F60F INC $0F,X ; 15c7 action (chained) C1/EB0E: 8012 BRA $EB22 ; --- C1/EB10: B514 LDA $14,X C1/EB12: 18 CLC C1/EB13: 696000 ADC #$0060 C1/EB16: 9514 STA $14,X C1/EB18: 2900FF AND #$FF00 C1/EB1B: D005 BNE $EB22 ; branch if zero C1/EB1D: F60F INC $0F,X ; 15cy action (unchained) C1/EB1F: EE1A06 INC $061A C1/EB22: A9C000 LDA #$00C0 C1/EB25: 957C STA $7C,X ; 1634 health C1/EB27: A9FF00 LDA #$00FF C1/EB2A: 95AC STA $AC,X ; 1664 machine gun health C1/EB2C: E220 SEP #$20 C1/EB2E: B515 LDA $15,X ; 15cd boss x C1/EB30: 952B STA $2B,X ; 15e3 boss x? C1/EB32: 38 SEC C1/EB33: E9C0 SBC #$C0 C1/EB35: 49FF EOR #$FF C1/EB37: 1A INC A C1/EB38: 18 CLC C1/EB39: 69C0 ADC #$C0 C1/EB3B: 9543 STA $43,X ; 15fb boss x? C1/EB3D: 826002 BRL $EDA0 C1/EB40: AD1008 LDA $0810 ; 15fb boss x? C1/EB43: D01B BNE $EB60 ; branch if zero C1/EB45: F60F INC $0F,X ; 15c7 state C1/EB47: E220 SEP #$20 C1/EB49: A918 LDA #$18 C1/EB4B: 8D0007 STA $0700 C1/EB4E: 8D1007 STA $0710 C1/EB51: A958 LDA #$58 C1/EB53: 8D0307 STA $0703 C1/EB56: 8D1307 STA $0713 C1/EB59: C220 REP #$20 C1/EB5B: A90280 LDA #$8002 C1/EB5E: 853E STA $3E C1/EB60: A9C000 LDA #$00C0 C1/EB63: 957C STA $7C,X ; 1634 health C1/EB65: A9FF00 LDA #$00FF C1/EB68: 95AC STA $AC,X ; 1664 machine gun health C1/EB6A: E220 SEP #$20 C1/EB6C: 203BF2 JSR $F23B C1/EB6F: C220 REP #$20 C1/EB71: A90060 LDA #$6000 C1/EB74: A00001 LDY #$0100 C1/EB77: 820D01 BRL $EC87 C1/EB7A: E220 SEP #$20 C1/EB7C: A940 LDA #$40 C1/EB7E: 9513 STA $13,X ; 15cb frames until can do an action again C1/EB80: C220 REP #$20 C1/EB82: F60F INC $0F,X ; 15c7 action C1/EB84: E220 SEP #$20 C1/EB86: ADD600 LDA $00D6 ; frame counter C1/EB89: 2903 AND #$03 C1/EB8B: D006 BNE $EB93 ; branch if zero C1/EB8D: B513 LDA $13,X ; 14cb frames until can do an action again C1/EB8F: F002 BEQ $EB93 ; branch if zero C1/EB91: D613 DEC $13,X ; 15cb frames until can do an action again C1/EB93: AD1606 LDA $0616 ; 2 = left foot moving, 1 = right foot moving, 3 = neither C1/EB96: 1A INC A C1/EB97: 2903 AND #$03 C1/EB99: D07A BNE $EC15 ; branch if zero C1/EB9B: B513 LDA $13,X ; 15cb frames until can do an action again C1/EB9D: C940 CMP #$40 C1/EB9F: B013 BCS $EBB4 ; branch if countdown >= 0x40/64 C1/EBA1: A5D6 LDA $D6 ; frame counter I think? C1/EBA3: 300F BMI $EBB4 ; branch if minus C1/EBA5: C220 REP #$20 C1/EBA7: 202FF2 JSR $F22F C1/EBAA: E220 SEP #$20 C1/EBAC: 9006 BCC $EBB4 C1/EBAE: A90C LDA #$0C C1/EBB0: 950F STA $0F,X ; 15c7 action C1/EBB2: 8061 BRA $EC15 ; --- C1/EBB4: B517 LDA $17,X ; 15cf walk direction, 0 = forward, 1 = forward and have taken damage, 255 = backward C1/EBB6: 100E BPL $EBC6 C1/EBB8: B537 LDA $37,X ; 15ef left knee? x C1/EBBA: D51F CMP $1F,X ; 15d7 left foot? x C1/EBBC: 1002 BPL $EBC0 C1/EBBE: B51F LDA $1F,X ; 15d7 left foot? x C1/EBC0: C970 CMP #$70 C1/EBC2: B03A BCS $EBFE C1/EBC4: 800F BRA $EBD5 ; --- C1/EBC6: B537 LDA $37,X ; 15ef left knee? x C1/EBC8: D51F CMP $1F,X ; 15d7 left foot? x C1/EBCA: 3002 BMI $EBCE C1/EBCC: B51F LDA $1F,X ; 15d7 left foot? x C1/EBCE: 0A ASL A C1/EBCF: B02D BCS $EBFE C1/EBD1: C930 CMP #$30 C1/EBD3: 9029 BCC $EBFE C1/EBD5: B513 LDA $13,X ; 15cb frames until we can do an action again C1/EBD7: D03C BNE $EC15 ; branch if zero C1/EBD9: AD0710 LDA $1007 ; Axelay x C1/EBDC: 38 SEC C1/EBDD: F507 SBC $07,X ; 15bf enemy x position C1/EBDF: 1015 BPL $EBF6 ; branch if plus C1/EBE1: B597 LDA $97,X ; 164f computed x position, used for laser C1/EBE3: 3011 BMI $EBF6 ; branch if minus C1/EBE5: C910 CMP #$10 C1/EBE7: 9015 BCC $EBFE ; branch if laser position < 10 C1/EBE9: B57C LDA $7C,X ; 1634 health C1/EBEB: C990 CMP #$90 C1/EBED: 900B BCC $EBFA ; branch if health < 0x90/144 C1/EBEF: ADD600 LDA $00D6 ; frame counter C1/EBF2: 2915 AND #$15 C1/EBF4: F004 BEQ $EBFA ; branch if zero C1/EBF6: A914 LDA #$14 ; bullets - 1 C1/EBF8: 8002 BRA $EBFC ; --- C1/EBFA: A90E LDA #$0E ; laser - 1 C1/EBFC: 950F STA $0F,X ; 15c7 action (first step toward laser) C1/EBFE: C220 REP #$20 C1/EC00: B516 LDA $16,X ; 15ce walk direction, 0xC0 = forward, 0x40 = backward C1/EC02: 4D1C06 EOR $061C C1/EC05: 0A ASL A C1/EC06: 9003 BCC $EC0B C1/EC08: 207FB2 JSR $B27F C1/EC0B: B516 LDA $16,X ; 15ce walk direction, C0 = forward, 0x40 = backward C1/EC0D: 8D1C06 STA $061C C1/EC10: A90060 LDA #$6000 C1/EC13: 806F BRA $EC84 ; --- C1/EC15: C220 REP #$20 C1/EC17: B57C LDA $7C,X ; 1634 health C1/EC19: 2900F8 AND #$F800 C1/EC1C: D014 BNE $EC32 ; branch if zero C1/EC1E: B516 LDA $16,X ; 15ce walk direction, C0 = forward, 40 = backward C1/EC20: 18 CLC C1/EC21: 7514 ADC $14,X ; 15cc changes quickly when walking backward? C1/EC23: 9514 STA $14,X ; 15cc changes quickly when walking backward? C1/EC25: EB XBA C1/EC26: E220 SEP #$20 C1/EC28: 952B STA $2B,X ; 15e3 boss x? C1/EC2A: 18 CLC C1/EC2B: 6980 ADC #$80 C1/EC2D: 9543 STA $43,X ; 15fb boss x? C1/EC2F: 826E01 BRL $EDA0 ; --- C1/EC32: B516 LDA $16,X ; 15ce walk direction, C0 = forward, 40 = backward C1/EC34: C900 CMP #$00 C1/EC36: 806A BRA $ECA2 ; --- C1/EC38: 49FF EOR #$FF C1/EC3A: FF1A80E2 SBC $E2801A,X C1/EC3E: E220 SEP #$20 C1/EC40: A9C0 LDA #$C0 C1/EC42: 9513 STA $13,X ; 15cd brames until can do an action again C1/EC44: C220 REP #$20 C1/EC46: F60F INC $0F,X ; 15c7 action C1/EC48: 8032 BRA $EC7C ; --- C1/EC4A: E220 SEP #$20 C1/EC4C: D613 DEC $13,X ; 15cb frames until can do an action gain C1/EC4E: F04D BEQ $EC9D ; branch if zero C1/EC50: C220 REP #$20 C1/EC52: 202FF2 JSR $F22F C1/EC55: B008 BCS $EC5F C1/EC57: E220 SEP #$20 C1/EC59: A90A LDA #$0A C1/EC5B: 950F STA $0F,X ; 15c7 action C1/EC5D: C220 REP #$20 C1/EC5F: AD0610 LDA $1006 ; Axelay micro x C1/EC62: 0A ASL A C1/EC63: 300E BMI $EC73 ; branch if Axelay is on the right half of the screen C1/EC65: B5A8 LDA $A8,X ; 1660 machine gun: 113 = alive, 0 = dead C1/EC67: D500 CMP $00,X ; 15b8 boss type: 113 = T-36 Towbar C1/EC69: D008 BNE $EC73 C1/EC6B: E220 SEP #$20 C1/EC6D: A911 LDA #$11 ; 17 > laser anyway, so should bullet C1/EC6F: 950F STA $0F,X ; 15c7 action C1/EC71: C220 REP #$20 C1/EC73: AD1606 LDA $0616 ; 2 = left foot moving, 1 = right foot moving, 3 = neither C1/EC76: 1A INC A C1/EC77: 290300 AND #$0003 C1/EC7A: D01B BNE $EC97 ; branch if zero C1/EC7C: A00001 LDY #$0100 C1/EC7F: AD0610 LDA $1006 C1/EC82: 8003 BRA $EC87 ; --- C1/EC84: A0C000 LDY #$00C0 C1/EC87: 8490 STY $90 C1/EC89: 38 SEC C1/EC8A: F506 SBC $06,X ; 15be ? decrements slowly while walking, sometimes faster, stops when action C1/EC8C: 0A ASL A C1/EC8D: A590 LDA $90 C1/EC8F: B004 BCS $EC95 C1/EC91: 49FFFF EOR #$FFFF C1/EC94: 1A INC A C1/EC95: 9516 STA $16,X ; 15ce walk direction, C0 = forward, 40 = backward C1/EC97: B516 LDA $16,X ; 15ce walk direction C1/EC99: 5C20EE03 JMP $03EE20 ; --- C1/EC9D: A9FF95 LDA #$95FF C1/ECA0: 13C2 ORA ($C2,S),Y ; I think this disassembly is wrong? C1/ECA2: 201616 JSR $1616 C1/ECA5: 80B8 BRA $EC5F ; --- C1/ECA7: E220 SEP #$20 C1/ECA9: A91B LDA #$1B C1/ECAB: 9527 STA $27,X ; 15df 0x1A/26=normal? 0x1B/27=laser? C1/ECAD: 953F STA $3F,X ; 157f ? never changes C1/ECAF: A91E LDA #$1E C1/ECB1: 959F STA $9F,X ; 1657 0x1D/29=not firing, 0x1E/30=charging? 0x1F/31=aiming 0x20/32=laser 0x21/33=laster onscreen 0x22/34=laster C1/ECB3: A940 LDA #$40 C1/ECB5: 95A3 STA $A3,X ; 165b ? Only changes on death C1/ECB7: F60F INC $0F,X ; 15c7 action (This is where laser happens!) C1/ECB9: C220 REP #$20 C1/ECBB: 82F700 BRL $EDB5 ; --- C1/ECBE: E220 SEP #$20 C1/ECC0: B59F LDA $9F,X ; 1657 laser status, 0x1D/29=not firing C1/ECC2: C91D CMP #$1D C1/ECC4: D006 BNE $ECCC C1/ECC6: F60F INC $0F,X ; 15c7 action C1/ECC8: A920 LDA #$20 C1/ECCA: 9513 STA $13,X ; 15cb frames until can do an action again C1/ECCC: ADD600 LDA $00D6 ; frame counter C1/ECCF: 2907 AND #$07 C1/ECD1: D008 BNE $ECDB ; branch if zero C1/ECD3: B5A2 LDA $A2,X C1/ECD5: 18 CLC C1/ECD6: 6940 ADC #$40 C1/ECD8: 2053F2 JSR $F253 C1/ECDB: AD0C06 LDA $060C C1/ECDE: C980 CMP #$80 C1/ECE0: 6A ROR A C1/ECE1: C980 CMP #$80 C1/ECE3: 6A ROR A C1/ECE4: C980 CMP #$80 C1/ECE6: 6A ROR A C1/ECE7: 18 CLC C1/ECE8: 7515 ADC $15,X C1/ECEA: 952B STA $2B,X C1/ECEC: 18 CLC C1/ECED: 6980 ADC #$80 C1/ECEF: 9543 STA $43,X C1/ECF1: C220 REP #$20 C1/ECF3: 82BF00 BRL $EDB5 ; --- C1/ECF6: E220 SEP #$20 C1/ECF8: D613 DEC $13,X ; 15cb frames until can do an action again C1/ECFA: D0DF BNE $ECDB ; branch if zero C1/ECFC: A91A LDA #$1A C1/ECFE: 9527 STA $27,X ; 15df 27=laser? 26=normal? C1/ED00: 953F STA $3F,X ; 15f7 something to do with laser? C1/ED02: A90A LDA #$0A ; walk C1/ED04: 950F STA $0F,X ; 15c7 action C1/ED06: C220 REP #$20 C1/ED08: 82AA00 BRL $EDB5 ; --- C1/ED0B: F60F INC $0F,X ; 15c7 action C1/ED0D: AD1606 LDA $0616 ; 2 = left foot moving, 1 = right foot moving, 3 = neighter C1/ED10: 1A INC A C1/ED11: 290300 AND #$0003 C1/ED14: F004 BEQ $ED1A ; branch if zero C1/ED16: 5C15EE03 JMP $03EE15 ; --- C1/ED1A: B506 LDA $06,X ; 15be ? changes a lot C1/ED1C: 0A ASL A C1/ED1D: B021 BCS $ED40 C1/ED1F: 101F BPL $ED40 C1/ED21: 202FF2 JSR $F22F C1/ED24: E220 SEP #$20 C1/ED26: 9011 BCC $ED39 C1/ED28: 203BF2 JSR $F23B C1/ED2B: B005 BCS $ED32 C1/ED2D: F60F INC $0F,X C1/ED2F: 82A9FF BRL $ECDB ; --- C1/ED32: A914 LDA #$14 C1/ED34: 950F STA $0F,X C1/ED36: 82A2FF BRL $ECDB ; --- C1/ED39: A90A LDA #$0A ; step C1/ED3B: 950F STA $0F,X ; 15c7 action C1/ED3D: 829BFF BRL $ECDB ; --- C1/ED40: 82BBFE BRL $EBFE ; --- C1/ED43: E220 SEP #$20 C1/ED45: B5A8 LDA $A8,X ; 1660 machine gun: 0x71/113 = alive, 0=dead C1/ED47: D500 CMP $00,X ; 15B8 boss type: 0x71/113 = boss C1/ED49: D0EE BNE $ED39 C1/ED4B: B5B7 LDA $B7,X ; 166f machine gun firing: 0x31/49 = no, 48/0x30 = between shots, 47/0x2f = yes C1/ED4D: C931 CMP #$31 C1/ED4F: D004 BNE $ED55 C1/ED51: 5C39EF03 JMP $03EF39 ; --- C1/ED55: ADD600 LDA $00D6 ; frame counter C1/ED58: 2903 AND #$03 C1/ED5A: F004 BEQ $ED60 C1/ED5C: 5CDBEE03 JMP $03EEDB C1/ED60: B5BA LDA $BA,X C1/ED62: 3008 BMI $ED6C C1/ED64: C940 CMP #$40 C1/ED66: 900A BCC $ED72 C1/ED68: A940 LDA #$40 C1/ED6A: 8006 BRA $ED72 ; --- C1/ED6C: C9D0 CMP #$D0 C1/ED6E: B002 BCS $ED72 C1/ED70: A9D0 LDA #$D0 C1/ED72: 2053F2 JSR $F253 C1/ED75: 8263FF BRL $ECDB ; --- C1/ED78: E220 SEP #$20 C1/ED7A: A930 LDA #$30 C1/ED7C: 9513 STA $13,X ; 15cb frames until can do an action again C1/ED7E: C220 REP #$20 C1/ED80: F60F INC $0F,X ; 15c7 action C1/ED82: E220 SEP #$20 C1/ED84: D613 DEC $13,X ; 15cb frames until can do an action again C1/ED86: D004 BNE $ED8C ; branch if zero C1/ED88: A90A LDA #$0A C1/ED8A: 950F STA $0F,X ; 15c7 action C1/ED8C: B513 LDA $13,X ; 15cb frames until can do an action again C1/ED8E: 291F AND #$1F C1/ED90: F004 BEQ $ED96 ; branch if zero C1/ED92: 5CDBEE03 JMP $03EEDB C1/ED96: C220 REP #$20 C1/ED98: 207FB2 JSR $B27F C1/ED9B: E220 SEP #$20 C1/ED9D: 823BFF BRL $ECDB ; ---- C1/EDA0: E220 SEP #$20 C1/EDA2: B52C LDA $2C,X ; 15e4 target head angle? C1/EDA4: 38 SEC C1/EDA5: F544 SBC $44,X ; 15fc target head angle? C1/EDA7: C980 CMP #$80 C1/EDA9: 6A ROR A C1/EDAA: 18 CLC C1/EDAB: 7544 ADC $44,X ; 15fc target head angle? C1/EDAD: 18 CLC C1/EDAE: 6990 ADC #$90 C1/EDB0: 2053F2 JSR $F253 C1/EDB3: C220 REP #$20 C1/EDB5: A00000 LDY #$0000 C1/EDB8: AD1606 LDA $0616 ; 2 = left foot moving, 1 = right foot moving, 3 = neighter C1/EDBB: 290300 AND #$0003 C1/EDBE: F054 BEQ $EE14 ; branch if zero C1/EDC0: 3A DEC A C1/EDC1: F017 BEQ $EDDA ; branch if zero C1/EDC3: 3A DEC A C1/EDC4: F01C BEQ $EDE2 ; branch if zero C1/EDC6: E220 SEP #$20 C1/EDC8: B539 LDA $39,X ; 15f1 right foot y C1/EDCA: 38 SEC C1/EDCB: F547 SBC $47,X ; 15ff right knee? y C1/EDCD: 8590 STA $90 C1/EDCF: B521 LDA $21,X ; 15d9 left foot y C1/EDD1: 38 SEC C1/EDD2: F52F SBC $2F,X ; 15e7 left knee? y C1/EDD4: C590 CMP $90 C1/EDD6: C220 REP #$20 C1/EDD8: B008 BCS $EDE2 C1/EDDA: 8A TXA C1/EDDB: 18 CLC C1/EDDC: 691800 ADC #$0018 C1/EDDF: A8 TAY C1/EDE0: 8006 BRA $EDE8 ; --- C1/EDE2: 8A TXA C1/EDE3: 18 CLC C1/EDE4: 693000 ADC #$0030 ; 15e8 I guess? C1/EDE7: A8 TAY C1/EDE8: B91500 LDA $0015,Y ; 15fd? C1/EDEB: C90080 CMP #$8000 C1/EDEE: 6A ROR A C1/EDEF: 8590 STA $90 C1/EDF1: B90600 LDA $0006,Y ; afa? C1/EDF4: 38 SEC C1/EDF5: E590 SBC $90 C1/EDF7: 9506 STA $06,X ; 15be ? changes a lot C1/EDF9: E220 SEP #$20 C1/EDFB: B90900 LDA $0009,Y ; afd? C1/EDFE: 38 SEC C1/EDFF: F91700 SBC $0017,Y ; b05? C1/EE02: 9509 STA $09,X ; 15c1 bullet launcher height C1/EE04: C220 REP #$20 C1/EE06: CC0A06 CPY $060A ; 208 = right foot moving, 232 = right foot moving C1/EE09: F007 BEQ $EE12 C1/EE0B: A92100 LDA #$0021 C1/EE0E: 220E9C00 JSR $009C0E C1/EE12: 8011 BRA $EE25 ; --- C1/EE14: B50C LDA $0C,X ; 15c4 something to do with initial chain, set to 0 then increased to 224 and left alone C1/EE16: 18 CLC C1/EE17: 692000 ADC #$0020 C1/EE1A: C90002 CMP #$0200 C1/EE1D: B002 BCS $EE21 C1/EE1F: 950C STA $0C,X ; 15c4 something to do with initial chain C1/EE21: 2218AF02 JSR $02AF18 C1/EE25: 8C0A06 STY $060A C1/EE28: 9C1606 STZ $0616 ; 2 = left foot moving, 1 = right foot moving, 3 = neihter C1/EE2B: B57C LDA $7C,X ; 1634 health C1/EE2D: 29FF00 AND #$00FF C1/EE30: D01C BNE $EE4E ; branch if zero C1/EE32: E220 SEP #$20 C1/EE34: A916 LDA #$16 C1/EE36: 950F STA $0F,X ; 15c7 action C1/EE38: C220 REP #$20 C1/EE3A: A9FFFF LDA #$FFFF C1/EE3D: 8D2403 STA $0324 C1/EE40: A96000 LDA #$0060 C1/EE43: 220E9C00 JSR $009C0E C1/EE47: A94700 LDA #$0047 C1/EE4A: 220E9C00 JSR $009C0E C1/EE4E: B50F LDA $0F,X ; 15c7 action C1/EE50: 29FF00 AND #$00FF C1/EE53: C90A00 CMP #$000A C1/EE56: 904F BCC $EEA7 ; branch if action < 11 C1/EE58: B57D LDA $7D,X ; 1635 iframe counter, 0 = vulnerable C1/EE5A: 29FF00 AND #$00FF C1/EE5D: F02E BEQ $EE8D ; branch if zero C1/EE5F: 4A LSR A C1/EE60: B020 BCS $EE82 C1/EE62: DA PHX C1/EE63: 8B PHB C1/EE64: A2A9F1 LDX #$F1A9 C1/EE67: A0A222 LDY #$22A2 C1/EE6A: A90F00 LDA #$000F C1/EE6D: 547E01 MVN $7E,$01 C1/EE70: AB PLB C1/EE71: FA PLX C1/EE72: A9E03C LDA #$3CE0 C1/EE75: 8FCA227E STA $7E22CA C1/EE79: A9E07D LDA #$7DE0 C1/EE7C: 8FCE227E STA $7E22CE C1/EE80: 8025 BRA $EEA7 C1/EE82: DA PHX C1/EE83: A0A0F1 LDY #$F1A0 C1/EE86: 222A8A00 JSR $008A2A C1/EE8A: FA PLX C1/EE8B: 801A BRA $EEA7 C1/EE8D: E220 SEP #$20 C1/EE8F: AD1406 LDA $0614 ; frame counter since start of boss fight C1/EE92: C940 CMP #$40 C1/EE94: B00F BCS $EEA5 ; branch if boss frame counter > 0x40 C1/EE96: 0A ASL A C1/EE97: 0A ASL A C1/EE98: 1002 BPL $EE9C C1/EE9A: 49FF EOR #$FF C1/EE9C: C220 REP #$20 C1/EE9E: A0C1F1 LDY #$F1C1 C1/EEA1: 2233E203 JSR $03E233 C1/EEA5: C220 REP #$20 C1/EEA7: A0C79E LDY #$9EC7 C1/EEAA: 2243B102 JSR $02B143 C1/EEAE: ADD500 LDA $00D5 ; always 0?!? C1/EEB1: 1004 BPL $EEB7 ; branch if signed value >= A C1/EEB3: 49FFFF EOR #$FFFF C1/EEB6: 1A INC A C1/EEB7: 4A LSR A C1/EEB8: 4A LSR A C1/EEB9: 4A LSR A C1/EEBA: EB XBA C1/EEBB: 291F00 AND #$001F C1/EEBE: 8FDE237E STA $7E23DE C1/EEC2: B506 LDA $06,X ; 15be ? changes a lot C1/EEC4: 38 SEC C1/EEC5: E9000B SBC #$0B00 C1/EEC8: 957E STA $7E,X ; 1636 ? seems to increase when forward, decrease backward, more quickly when about to step, ??? C1/EECA: B508 LDA $08,X ; 15c0 seems to change when walks off left screen C1/EECC: 38 SEC C1/EECD: E90005 SBC #$0500 C1/EED0: 9580 STA $80,X ; 1638 ? changes sometimes after stepping toward left C1/EED2: 2023F9 JSR $F923 C1/EED5: AD1406 LDA $0614 ; frame counter since start of boss fight C1/EED8: 1A INC A C1/EED9: F003 BEQ $EEDE ; branch if zero C1/EEDB: 8D1406 STA $0614 C1/EEDE: 5C81BE02 JMP $02BE81 ; --- C1/EEE2: 2215BC02 JSR $02BC15 C1/EEE6: 290400 AND #$0004 C1/EEE9: A8 TAY C1/EEEA: B9B9F1 LDA $F1B9,Y C1/EEED: 8FBE237E STA $7E23BE C1/EEF1: B9BBF1 LDA $F1BB,Y C1/EEF4: 8FFE237E STA $7E23FE C1/EEF8: B508 LDA $08,X ; 1660 machine gun: 113=alive, 0=dead C1/EEFA: 18 CLC C1/EEFB: 692900 ADC #$0029 C1/EEFE: 9508 STA $08,X ; 1660 machine gun: 113=alive, 0=dead C1/EF00: C900B0 CMP #$B000 C1/EF03: B011 BCS $EF16 C1/EF05: C900A0 CMP #$A000 C1/EF08: B046 BCS $EF50 C1/EF0A: A5D6 LDA $D6 C1/EF0C: 290700 AND #$0007 C1/EF0F: F003 BEQ $EF14 C1/EF11: 209FD6 JSR $D69F C1/EF14: 803A BRA $EF50 ; --- C1/EF16: F60F INC $0F,X ; 15c7 action C1/EF18: 9C0007 STZ $0700 C1/EF1B: 9C1007 STZ $0710 C1/EF1E: 9C1806 STZ $0618 C1/EF21: A90101 LDA #$0101 C1/EF24: 8D1E06 STA $061E C1/EF27: 9C3009 STZ $0930 C1/EF2A: A91080 LDA #$8010 C1/EF2D: 8D3E00 STA $003E C1/EF30: 2062B2 JSR $B262 C1/EF33: A96000 LDA #$0060 C1/EF36: 220E9C00 JSR $009C0E C1/EF3A: E220 SEP #$20 C1/EF3C: A980 LDA #$80 C1/EF3E: 9513 STA $13,X C1/EF40: C220 REP #$20 C1/EF42: DA PHX C1/EF43: A23016 LDX #$1630 C1/EF46: A90500 LDA #$0005 C1/EF49: A0E1F1 LDY #$F1E1 C1/EF4C: 2098DC JSR $DC98 C1/EF4F: FA PLX C1/EF50: A5D6 LDA $D6 C1/EF52: 820AFF BRL $EE5F C1/EF55: 209FD6 JSR $D69F C1/EF58: 8B PHB C1/EF59: DA PHX C1/EF5A: AE1806 LDX $0618 C1/EF5D: AD1E06 LDA $061E C1/EF60: 8592 STA $92 C1/EF62: A9007F LDA #$7F00 C1/EF65: 48 PHA C1/EF66: AB PLB C1/EF67: AB PLB C1/EF68: A90001 LDA #$0100 C1/EF6B: 8590 STA $90 C1/EF6D: BD00C0 LDA $C000,X C1/EF70: E220 SEP #$20 C1/EF72: 4A LSR A C1/EF73: 9003 BCC $EF78 C1/EF75: 9E00C0 STZ $C000,X C1/EF78: EB XBA C1/EF79: 4A LSR A C1/EF7A: 9003 BCC $EF7F C1/EF7C: 9E01C0 STZ $C001,X C1/EF7F: C220 REP #$20 C1/EF81: E8 INX C1/EF82: E8 INX C1/EF83: C690 DEC $90 C1/EF85: D0E6 BNE $EF6D C1/EF87: A2A022 LDX #$22A0 C1/EF8A: A90000 LDA #$0000 C1/EF8D: 9F00007E STA $7E0000,X C1/EF91: A95F00 LDA #$005F C1/EF94: 9B TXY C1/EF95: C8 INY C1/EF96: 547E7E MVN $7E,$7E C1/EF99: FA PLX C1/EF9A: AB PLB C1/EF9B: 202EF9 JSR $F92E C1/EF9E: 9005 BCC $EFA5 C1/EFA0: 9C1806 STZ $0618 C1/EFA3: 8007 BRA $EFAC C1/EFA5: 18 CLC C1/EFA6: 6D1806 ADC $0618 C1/EFA9: 8D1806 STA $0618 C1/EFAC: A98000 LDA #$0080 C1/EFAF: 38 SEC C1/EFB0: F513 SBC $13,X C1/EFB2: 2262B904 JSR $04B962 C1/EFB6: E220 SEP #$20 C1/EFB8: B513 LDA $13,X C1/EFBA: 4A LSR A C1/EFBB: C904 CMP #$04 C1/EFBD: B003 BCS $EFC2 C1/EFBF: 8D0D06 STA $060D C1/EFC2: D613 DEC $13,X C1/EFC4: C220 REP #$20 C1/EFC6: D061 BNE $F029 C1/EFC8: 9C0007 STZ $0700 C1/EFCB: 9C1007 STZ $0710 C1/EFCE: A90280 LDA #$8002 C1/EFD1: 853E STA $3E C1/EFD3: 22C1B900 JSR $00B9C1 C1/EFD7: DA PHX C1/EFD8: A90030 LDA #$3000 C1/EFDB: 221FB902 JSR $02B91F C1/EFDF: FA PLX C1/EFE0: F60F INC $0F,X C1/EFE2: E220 SEP #$20 C1/EFE4: A97C LDA #$7C C1/EFE6: 9513 STA $13,X C1/EFE8: C220 REP #$20 C1/EFEA: E220 SEP #$20 C1/EFEC: B513 LDA $13,X C1/EFEE: F002 BEQ $EFF2 C1/EFF0: D613 DEC $13,X C1/EFF2: 4A LSR A C1/EFF3: 4A LSR A C1/EFF4: 09E0 ORA #$E0 C1/EFF6: 8D3221 STA $2132 C1/EFF9: 9C3021 STZ $2130 C1/EFFC: C220 REP #$20 C1/EFFE: A5D6 LDA $D6 C1/F000: 290300 AND #$0003 C1/F003: D024 BNE $F029 C1/F005: 9B TXY C1/F006: 22ADAE02 JSR $02AEAD C1/F00A: B01C BCS $F028 C1/F00C: 20E9DC JSR $DCE9 C1/F00F: 2215BC02 JSR $02BC15 C1/F013: 4A LSR A C1/F014: 9506 STA $06,X C1/F016: 290F00 AND #$000F C1/F019: 8590 STA $90 C1/F01B: A90010 LDA #$1000 C1/F01E: 9003 BCC $F023 C1/F020: A900C0 LDA #$C000 C1/F023: 18 CLC C1/F024: 658F ADC $8F C1/F026: 9508 STA $08,X C1/F028: BB TYX C1/F029: 2023F9 JSR $F923 C1/F02C: 82AFFE BRL $EEDE ; --- C1/F02F: AD0810 LDA $1008 C1/F032: 38 SEC C1/F033: F508 SBC $08,X C1/F035: B003 BCS $F03A C1/F037: C900E0 CMP #$E000 C1/F03A: 60 RTS ; --- C1/F03B: B5A8 LDA $A8,X ; 1660 machine gun: 113=alive, 0=dead C1/F03D: D500 CMP $00,X ; 15b8 boss type: 113=T-36 Towbar C1/F03F: D010 BNE $F051 C1/F041: B5B7 LDA $B7,X ; 166f machine gun firing: 0x31/49 = no, 48/0x30 = between shots, 47/0x2f = yes C1/F043: C931F0 CMP #$F031 ; not firing C1/F046: 0A ASL A C1/F047: C92ED0 CMP #$D02E ; ? machine gun status C1/F04A: 06A9 ASL $A9 ; I think this disassembly is wrong... C1/F04C: 2F95B718 AND $18B795 C1/F050: 60 RTS
src/Sym_Expr/symbolic_expressions.ads
fintatarta/eugen
0
29534
<gh_stars>0 ---------------------------------------------------------------------------- -- Symbolic Expressions (symexpr) -- -- Copyright (C) 2012, <NAME> -- -- This file is part of symexpr. -- -- symexpr is free software: you can redistribute it and/or modify -- it under the terms of the Lesser GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- symexpr is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the Lesser GNU General Public License -- along with gclp. If not, see <http://www.gnu.org/licenses/>. ---------------------------------------------------------------------------- -- -- <summary> -- I wrote the first version of this package a day when I wanted to allow -- the user of a program to specify values in a symbolic form like -- "max(intro.end, bluesheet.end)" After writing the code that handled this -- type of expression, I noticed that the code was general enough and with -- minimal effort I converted it to a generic package that I succesively -- improved. -- -- This package allows you to handle expression in "symbolic" form inside -- your program. Expressions operate on "scalars" whose type parametrizes -- this package (so you can have expressions of floats, integers or... -- dates [my case]). -- -- You can -- -- (A) Construct symbolic expression -- => by parsing strings with Parse, e.g., -- -- X := parse("2*3 - max(y, abs(u))") -- -- => by constructing them using the provided constructors and -- operators. For example, -- -- X := Variable("x"); -- Poly := to_expr(12)*X*X - to_expr(4)*x + to_expr(1); -- Top := Function_Call("max", Function_Call("abs", x), Poly); -- -- in this case Top is an expression that represents the function -- -- max(abs(x), 12*x*x - 4*x + 1) -- -- (B) Replace variables in expression with scalars or other -- expressions (function Replace) -- -- (C) Evaluate an expression. For example, to plot a graph of Top(X) -- you can use -- -- for I in 1..10 loop -- Plot(I, Eval(Replace(Top, "x", I))); -- end loop; -- -- As said above, this package is parameterized by the type of the scalar. -- It requires that the usual operators (+, -, *, ...) are defined. -- </summary> -- with Ada.Strings.Unbounded; with Ada.Finalization; with Ada.Containers.Indefinite_Ordered_Maps; with Ada.Containers.Indefinite_Ordered_Sets; -- with Symbolic_Identifiers; -- -- -- generic type Scalar_Type is private; -- The type representing the scalars type Scalar_Array is array (Positive range <>) of Scalar_Type; type Identifier is private; with function "<" (L, R : Identifier) return Boolean is <>; with function "+" (X : Scalar_Type) return Scalar_Type is <>; with function "-" (X : Scalar_Type) return Scalar_Type is <>; with function "+" (L, R : Scalar_Type) return Scalar_Type is <>; with function "-" (L, R : Scalar_Type) return Scalar_Type is <>; with function "*" (L, R : Scalar_Type) return Scalar_Type is <>; with function "/" (L, R : Scalar_Type) return Scalar_Type is <>; with function Call (Name : Identifier; Param : Scalar_Array) return Scalar_Type is <>; -- Callback used to evaluate the functions in a Symoblic_Expression -- Name is the name of the function, while Param will store the -- parameters given to the function with function Image (Item : Scalar_Type) return String; -- Return a text representation of a scalar with function ID_Image (Item : Identifier) return String; -- Return a text representation of a scalar package Symbolic_Expressions is -- use type Symbolic_Identifiers.Identifier; subtype Variable_Name is Identifier; subtype Function_Name is Identifier; type Symbolic_Expression is new Ada.Finalization.Controlled with private; type Expression_Array is array (Positive range <>) of Symbolic_Expression; function Is_Constant (X : Symbolic_Expression) return Boolean; -- Return true if X has no free variables Not_A_Scalar : exception; function Eval (X : Symbolic_Expression) return Scalar_Type; -- Evaluate expression X and return the corresponding scalar value. -- Raise Not_A_Scalar is Is_Constant(X) is false function To_Expr (X : Scalar_Type) return Symbolic_Expression; -- Return an expression representing the value of X function Variable (Name : Variable_Name) return Symbolic_Expression; -- Return an expression representing the given variable function Function_Call (Name : Function_Name; Parameters : Expression_Array) return Symbolic_Expression; -- Return an expression representing a function call function "+" (L : Symbolic_Expression) return Symbolic_Expression; function "-" (L : Symbolic_Expression) return Symbolic_Expression; function "+" (L, R : Symbolic_Expression) return Symbolic_Expression; function "-" (L, R : Symbolic_Expression) return Symbolic_Expression; function "*" (L, R : Symbolic_Expression) return Symbolic_Expression; function "/" (L, R : Symbolic_Expression) return Symbolic_Expression; function "+" (L : Symbolic_Expression; R : Scalar_Type) return Symbolic_Expression; function "-" (L : Symbolic_Expression; R : Scalar_Type) return Symbolic_Expression; function "*" (L : Symbolic_Expression; R : Scalar_Type) return Symbolic_Expression; function "/" (L : Symbolic_Expression; R : Scalar_Type) return Symbolic_Expression; function "+" (L : Scalar_Type; R : Symbolic_Expression) return Symbolic_Expression; function "-" (L : Scalar_Type; R : Symbolic_Expression) return Symbolic_Expression; function "*" (L : Scalar_Type; R : Symbolic_Expression) return Symbolic_Expression; function "/" (L : Scalar_Type; R : Symbolic_Expression) return Symbolic_Expression; package Variable_Sets is new Ada.Containers.Indefinite_Ordered_Sets (Variable_Name); function Free_Variables (Item : Symbolic_Expression) return Variable_Sets.Set; -- Return the name of the variables used in Item procedure Iterate_On_Vars (Item : Symbolic_Expression; Process : access procedure (Var_Name : Variable_Name)); -- Call Process for every variable in Item function Replace (Item : Symbolic_Expression; Var_Name : Variable_Name; Value : Scalar_Type) return Symbolic_Expression; -- Replace every occurence of Var_Name in Item with the given scalar value package Variable_Tables is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => Variable_Name, Element_Type => Scalar_Type); -- Maps Variable_Tables.Maps are used to associate values to -- variable names function Replace (Item : Symbolic_Expression; Table : Variable_Tables.Map) return Symbolic_Expression; -- For every variable in Item, check if the variable name is a key -- of Table and, if found, replace every occurence of the variable -- with the corresponding value stored in Table. function Replace (Item : Symbolic_Expression; Var_Name : Variable_Name; Value : Symbolic_Expression) return Symbolic_Expression; -- Replace every instance of variable Var_Name with the expression -- Value -- ============= -- -- == PARSING == -- -- ============= -- -- =========== -- -- == DEBUG == -- -- =========== -- function Dump (Item : Symbolic_Expression) return String; -- Return a textual representation of Item. Useful for debugging. -- Currently it returns a tree-like string similar to -- -- * -- Const 4 -- - -- + -- Const 5 -- Const 1 -- Call max -- Var pluto.end -- Var pippo.end -- -- The tree above is relative to the expression -- -- 4 * (5 + 1 - max (pluto.end, pippo.end)) -- -- Why does not it return a "human" string like the latter one? Because -- Dump is for debugging, so it is more useful to be able to see the -- internal structure of Item. private -- -- use Ada.Strings.Unbounded; -- package Bounded_IDs is -- new Ada.Strings.Bounded.Generic_Bounded_Length (Symbolic_Identifiers.Max_ID_Length); -- subtype Bounded_ID is Bounded_IDs.Bounded_String -- with Dynamic_Predicate => Symbolic_Identifiers.Is_Valid_ID (Bounded_IDs.To_String (Bounded_ID)); -- function To_Bounded_ID (X : Symbolic_Identifiers.Variable_Name) return Bounded_ID -- is (Bounded_IDs.To_Bounded_String (String (X))); -- -- function To_String (X : Bounded_ID) return String -- is (Bounded_IDs.To_String (X)); use Ada.Finalization; -- A symbolic expression is stored as a tree, where each node has a -- "class" representing the operation associated with the node. type Node_Class is (Unary_Plus, Unary_Minus, Sum, Sub, Mult, Div, Fun_Call, Var, Const); type Node_Type (Class : Node_Class); type Node_Access is access Node_Type; type Parameter_Array is array (1..128) of Node_Access; type Node_Type (Class : Node_Class) is record case Class is when Unary_Plus | Unary_Minus => Term : Node_Access; when Sum | Sub | Mult | Div => Left, Right : Node_Access; when Fun_Call => Fun_Name : Function_Name; Parameters : Parameter_Array; N_Params : Natural; when Var => Var_Name : Variable_Name; when Const => Value : Scalar_Type; end case; end record; function Duplicate (Item : Node_Access) return Node_Access; pragma Precondition (Item /= null); -- Create a duplicate of the tree rooted in Item procedure Free (Item : in out Node_Access); -- Release the memory associated with the tree in Item -- -- Symbolic_Expression is just a thin "shell" around Node_Access. -- This makes recursive procedures a bit simpler and allows us -- to hide all the house-keeping from the user. -- type Symbolic_Expression is new Ada.Finalization.Controlled with record Expr : Node_Access; end record; overriding procedure Initialize (Item : in out Symbolic_Expression); overriding procedure Finalize (Item : in out Symbolic_Expression); overriding procedure Adjust (Item : in out Symbolic_Expression); end Symbolic_Expressions;
fret-electron/app/parser/Requirement.g4
xerebz/fret
0
1247
<reponame>xerebz/fret<gh_stars>0 // ***************************************************************************** // Notices: // // Copyright � 2019 United States Government as represented by the Administrator // of the National Aeronautics and Space Administration. All Rights Reserved. // // Disclaimers // // No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF // ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED // TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, // ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, // OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE // ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO // THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN // ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, // RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS // RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY // DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF // PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT ''AS IS.'' // // Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST // THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS // ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN // ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, // INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S // USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE // UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY // PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR // ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS // AGREEMENT. // ***************************************************************************** grammar Requirement ; // 16 reqts : reqt + ; reqt : 'requirement' (DIGITS | ID | REQT_ID) ':' reqt_body ; reqt_body : (nasa | freeform) ('.')? ; freeform : STRING ; nasa : (scope)? (reqt_condition)? (component SHALL | SHALL component) (timing)? response ; //unhandled: "Not unless !tank_empty shall the pump satisfy pump_on" //note: Can't have "when/if/unless scope_condition" because when/if/unless //also introduce a precondition (see qualifier_word, qualified_condition1). scope : ( (ONLY ( ((DURING | ((WHEN | IF)? IN)) scope_mode) | (WHILE scope_condition) | ((AFTER | BEFORE) (scope_mode | scope_condition)))) | (EXCEPT (((DURING | ((WHEN | IF)? IN)) scope_mode) | (WHILE scope_condition))) | ((WHEN | IF) NOT? IN scope_mode) | ((IN | DURING) scope_mode) | (UNLESS IN scope_mode) | (WHILE scope_condition) | ((AFTER | BEFORE) (scope_mode | scope_condition)) ) (',')? ; //scope // : ('only' | 'Only')? // ( (scope_word // | (('when' | 'When'| 'unless' | 'Unless')? ('not')? // ('In' | 'in')) // | ('during' | 'During') // ) // ) // scope_mode ('mode')? (',')? // ; //scope_word // : ('before' | 'Before' | 'after' | 'After') // ; //scope_required : ('(' | ',')? 'which' 'is' ('not')? 'required' 'to' 'occur' (')')? ; reqt_condition : (AND)? (regular_condition) ; //only_condition // : 'only' regular_condition ; regular_condition : qualified_condition1 ((',')? qualified_condition2)* (',')? ; qualifier_word : (WHEN | UNLESS | WHERE | IF | UPON) ; qualified_condition1 : qualifier_word pre_condition (IS (TRUE | FALSE))? ; qualified_condition2 : (AND | OR)? qualifier_word pre_condition (IS (TRUE | FALSE))? ; scope_condition : bool_expr ; scope_mode : (MODE mode_name) | (mode_name MODE) | mode_name; pre_condition : bool_expr ; stop_condition : bool_expr ; //persist_condition : bool_expr ; //persist_duration : duration ; component : THE? component_name ; response : satisfaction; // | action | order | not_order; satisfaction : SATISFY post_condition ; timing : (',')? timing_aux (',')? ; timing_aux : WITHIN duration_upper | FOR duration_upper | AFTER duration_lower | UNTIL stop_condition | BEFORE stop_condition | AT THE NEXT TIMEPOINT | IMMEDIATELY | EVENTUALLY | ALWAYS | NEVER ; duration_upper : duration ; duration_lower : duration ; component_name : ID ; mode_name : ID ; duration : NUMBER timeunit ; timeunit : TICK | MICROSECOND | MILLISECOND | SECOND | MINUTE | HOUR ; //EARS //qualifier // : event // | optional_feature // | state_condition // | unwanted_condition // ; // event // : 'when' bool_expr // | 'upon' bool_expr // ; // optional_feature // : 'where' bool_expr // ; // state_condition // : 'while' bool_expr // | 'unless' bool_expr // ; // unwanted_condition // : 'if' bool_expr 'then' // ; post_condition : bool_expr ; bool_expr : ('!' | '~') bool_expr | bool_expr '&' bool_expr | bool_expr ('|'|XOR) bool_expr // | <assoc=right> bool_expr '=>' bool_expr | bool_expr ('->' | '=>'| '<->' | '<=>') bool_expr | IF bool_expr THEN bool_expr //| bool_expr '=' bool_expr | '(' bool_expr ')' | numeric_expr RELATIONAL_OP numeric_expr | ID ('(' ( numeric_expr (',' numeric_expr)*)? ')')? | 'true' | 'false' // | tl_expr ; // tl_expr : // 'Y' bool_expr // | 'H' tl_intvl bool_expr // | 'O' tl_intvl bool_expr // | bool_expr 'S' tl_intvl bool_expr // ; // tl_intvl : // | '[' duration ']' // | '[' duration ',' duration ']' // ; numeric_expr : numeric_expr '^' numeric_expr // | <assoc=right> numeric_expr '^' numeric_expr | '-' numeric_expr | numeric_expr ('*' | '/' | MOD) numeric_expr | numeric_expr ('+' | '-') numeric_expr | NUMBER | ID ('(' ( numeric_expr (',' numeric_expr)*)? ')')? | '(' numeric_expr ')' ; AFTER : A F T E R; ALWAYS : A L W A Y S; AND : A N D; AT : A T; BEFORE : B E F O R E; DURING : D U R I N G; EVENTUALLY : E V E N T U A L L Y; EXCEPT : E X C E P T; FALSE : F A L S E; FOR : F O R; HOUR : H O U R S?; IF : I F; IMMEDIATELY : I M M E D I A T E L Y; IN : I N; IS : I S; MICROSECOND : M I C R O S E C (O N D)? S?; MILLISECOND : M I L L I S E C (O N D)? S?; MINUTE : M I N U T E S?; MOD : M O D; MODE : M O D E; NEVER : N E V E R; NEXT : N E X T; NOT : N O T; ONLY : O N L Y; OR : O R; SATISFY : S A T I S F Y; SECOND : S E C (O N D)? S?; SHALL : S H A L L; THE : T H E; THEN : T H E N; TICK : T I C K S?; TIMEPOINT : T I M E P O I N T; TRUE : T R U E; UNLESS : U N L E S S; UNTIL : U N T I L; UPON : U P O N; WHEN : W H E N; WHERE : W H E R E; WHILE : W H I L E; WITHIN : W I T H I N; XOR : X O R; STRING: '"' (ESC|.)*? '"' ; RELATIONAL_OP : '<' | '<=' | '>' | '>=' | '=' | '!=' ; NUMBER : '-'? INT '.' [0-9]+ EXP? | '-'? INT EXP | '-'? INT ; fragment EXP : [Ee] [+\-]? INT ; fragment INT : '0' | [1-9][0-9]* ; DIGITS : '0'..'9'+ ; ID : ('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ; REQT_ID : ('a'..'z'|'A'..'Z'|'0'..'9') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|'.')* ; //PREDICATE : ('A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ; //FUNCTION : ('a'..'z') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ; //COMMENT // : '//' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;} // | '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;} // ; WS : ( ' ' | '\t' | '\r' | '\n' ) -> channel(HIDDEN) ; fragment ESC : '\\"' | '\\\\' ; // \" or \\ fragment A : [aA]; fragment B : [bB]; fragment C : [cC]; fragment D : [dD]; fragment E : [eE]; fragment F : [fF]; fragment G : [gG]; fragment H : [hH]; fragment I : [iI]; fragment J : [jJ]; fragment K : [kK]; fragment L : [lL]; fragment M : [mM]; fragment N : [nN]; fragment O : [oO]; fragment P : [pP]; fragment Q : [qQ]; fragment R : [rR]; fragment S : [sS]; fragment T : [tT]; fragment U : [uU]; fragment V : [vV]; fragment W : [wW]; fragment X : [xX]; fragment Y : [yY]; fragment Z : [zZ];
demo1/xercise.adb
MatrixMike/AdaDemo1
1
3438
with Ada.Text_IO; use Ada.Text_IO; --with xample1; --use xample1; package body xample1 is procedure xercise is begin xample.SayWelcome(1); end xercise; end xample1;
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2sint_callee.asm
jpoikela/z88dk
640
241427
SECTION code_clib SECTION code_fp_math48 PUBLIC ___fs2sint_callee EXTERN cm48_sdcciyp_ds2sint_callee defc ___fs2sint_callee = cm48_sdcciyp_ds2sint_callee
libsrc/_DEVELOPMENT/math/float/math32/lm32/z80/asm__dtoa_sgnabs.asm
jpoikela/z88dk
640
95260
SECTION code_clib SECTION code_fp_math32 PUBLIC __dtoa_sgnabs EXTERN m32__dtoa_sgnabs ; enter : x = dehl' = floating point number ; ; exit : dehl' = |x| ; a = sgn(x) = 1 if negative, 0 otherwise ; ; uses : af DEFC __dtoa_sgnabs = m32__dtoa_sgnabs ; enter stack = ret ; DEHL' = d32_float ; return DEHL' = d32_float ; A = sign
libsrc/spectrum/display/zx_saddr2px.asm
meesokim/z88dk
0
246857
; uint zx_saddr2px(void *pixeladdr, uchar mask) ; CALLER linkage for function pointers PUBLIC zx_saddr2px EXTERN zx_saddr2px_callee EXTERN ASMDISP_ZX_SADDR2PX_CALLEE .zx_saddr2px pop af pop de pop hl push hl push de push af ld a,e jp zx_saddr2px_callee + ASMDISP_ZX_SADDR2PX_CALLEE
src/bbqueue.adb
skade/bbqueue-spark
8
30513
-- with Ada.Text_IO; use Ada.Text_IO; with Atomic; use Atomic; package body BBqueue with SPARK_Mode => On is ----------- -- Grant -- ----------- procedure Grant (This : in out Offsets_Only; G : in out Write_Grant; Size : Count) is Read, Write, Start : Count; Max : constant Count := This.Size; Already_Inverted : Boolean; In_Progress : Boolean; begin if Size = 0 then G.Result := Empty; G.Slice := Empty_Slice; return; end if; Test_And_Set (This.Write_In_Progress, In_Progress, Acq_Rel); if In_Progress then G.Result := Grant_In_Progress; G.Slice := Empty_Slice; return; end if; if Size > This.Size then Clear (This.Write_In_Progress, Release); G.Result := Insufficient_Size; G.Slice := Empty_Slice; return; end if; -- Writer component. Must never write to `read`, -- be careful writing to `load` Write := Atomic_Count.Load (This.Write, Acquire); Read := Atomic_Count.Load (This.Read, Acquire); Already_Inverted := Write < Read; if Already_Inverted then -- The original comparison is ((Write + Size) < Read), it is modified -- to avoid integer overflow. if Count'Last - Size >= Write and then (Write + Size) < Read then -- Inverted, room is still available Start := Write; else -- Inverted, no room is available Clear (This.Write_In_Progress, Release); G.Result := Insufficient_Size; G.Slice := Empty_Slice; This.Granted_Write_Size := 0; return; end if; else -- The original comparison is ((Write + Size) <= Max), it is modified -- to avoid integer overflow. if Count'Last - Size >= Write and then (Write + Size) <= Max then -- Non inverted condition Start := Write; else -- Not inverted, but need to go inverted -- NOTE: We check Size < Read, NOT <=, because -- write must never == read in an inverted condition, since -- we will then not be able to tell if we are inverted or not if Size < Read then Start := 0; else -- Inverted, no room is available Clear (This.Write_In_Progress, Release); G.Result := Insufficient_Size; G.Slice := Empty_Slice; This.Granted_Write_Size := 0; return; end if; end if; end if; -- This is what we want to prove: the granted slice is in the writeable -- area. pragma Assert (Size /= 0); pragma Assert (In_Writable_Area (This, Start)); pragma Assert (In_Writable_Area (This, Start + Size - 1)); Atomic_Count.Store (This.Reserve, Start + Size, Release); This.Granted_Write_Size := Size; G.Result := Valid; G.Slice := (Size, Start, Start + Size - 1); end Grant; ------------ -- Commit -- ------------ procedure Commit (This : in out Offsets_Only; G : in out Write_Grant; Size : Count := Count'Last) is Used, Write, Last, New_Write : Count; Max : constant Count := This.Size; Len : constant Count := This.Granted_Write_Size; begin -- If there is no grant in progress, return early. This -- generally means we are dropping the grant within a -- wrapper structure if not Set (This.Write_In_Progress, Acquire) then return; end if; -- Writer component. Must never write to READ, -- be careful writing to LAST -- Saturate the grant commit Used := Count'Min (Len, Size); Write := Atomic_Count.Load (This.Write, Acquire); Atomic_Count.Sub (This.Reserve, Len - Used, Acq_Rel); Last := Atomic_Count.Load (This.Last, Acquire); New_Write := Atomic_Count.Load (This.Reserve, Acquire); if (New_Write < Write) and then (Write /= Max) then -- We have already wrapped, but we are skipping some bytes at the end -- of the ring. Mark `last` where the write pointer used to be to hold -- the line here Atomic_Count.Store (This.Last, Write, Release); elsif New_Write > Last then -- We're about to pass the last pointer, which was previously the -- artificial end of the ring. Now that we've passed it, we can -- "unlock" the section that was previously skipped. -- -- Since new_write is strictly larger than last, it is safe to move -- this as the other thread will still be halted by the (about to be -- updated) write value Atomic_Count.Store (This.Last, Max, Release); end if; -- else: If new_write == last, either: -- * last == max, so no need to write, OR -- * If we write in the end chunk again, we'll update last to max next -- time -- * If we write to the start chunk in a wrap, we'll update last when we -- move write backwards -- Write must be updated AFTER last, otherwise read could think it was -- time to invert early! Atomic_Count.Store (This.Write, New_Write, Release); -- Nothing granted anymore This.Granted_Write_Size := 0; G.Result := Empty; G.Slice := Empty_Slice; -- Allow subsequent grants Clear (This.Write_In_Progress, Release); end Commit; ---------- -- Read -- ---------- procedure Read (This : in out Offsets_Only; G : in out Read_Grant; Max : Count := Count'Last) is Read, Write, Last, Size : Count; In_Progress : Boolean; begin Test_And_Set (This.Read_In_Progress, In_Progress, Acq_Rel); if In_Progress then G.Result := Grant_In_Progress; G.Slice := Empty_Slice; return; end if; Write := Atomic_Count.Load (This.Write, Acquire); Read := Atomic_Count.Load (This.Read, Acquire); Last := Atomic_Count.Load (This.Last, Acquire); -- Resolve the inverted case or end of read if Read = Last and then Write < Read then Read := 0; -- This has some room for error, the other thread reads this -- Impact to Grant: -- Grant checks if read < write to see if inverted. If not -- inverted, but no space left, Grant will initiate an inversion, -- but will not trigger it -- Impact to Commit: -- Commit does not check read, but if Grant has started an -- inversion, grant could move Last to the prior write position -- MOVING READ BACKWARDS! Atomic_Count.Store (This.Read, 0, Release); end if; Size := (if Write < Read then Last - Read else Write - Read); -- Bound the slice with the maximum size requested by the user Size := Count'Min (Size, Max); if Size = 0 then Clear (This.Read_In_Progress); G.Result := Empty; G.Slice := Empty_Slice; return; end if; -- This is what we want to prove: the granted slice is in the readable -- area. pragma Assert (Size /= 0); pragma Assert (In_Readable_Area (This, Read)); pragma Assert (In_Readable_Area (This, Read + Size - 1)); This.Granted_Read_Size := Size; G.Result := Valid; G.Slice := (Size, Read, Read + Size - 1); end Read; ------------- -- Release -- ------------- procedure Release (This : in out Offsets_Only; G : in out Read_Grant; Size : Count := Count'Last) is Used : Count; begin -- Saturate the grant commit Used := Count'Min (This.Granted_Read_Size, Size); -- If there is no grant in progress, return early. This -- generally means we are dropping the grant within a -- wrapper structure if not Set (This.Read_In_Progress, Acquire) then return; end if; -- This should always be checked by the public interfaces -- debug_assert! (used <= self.buf.len ()); -- This should be fine, purely incrementing Atomic_Count.Add (This.Read, Used, Release); -- Nothing granted anymore This.Granted_Read_Size := 0; G.Result := Empty; G.Slice := Empty_Slice; -- Allow subsequent read Clear (This.Read_In_Progress, Release); end Release; end BBqueue;
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1506.asm
ljhsiun2/medusa
9
161844
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x6672, %rsi lea addresses_WC_ht+0x876e, %rdi nop nop nop nop nop add %r11, %r11 mov $101, %rcx rep movsb sub $20289, %rbx lea addresses_A_ht+0x10a32, %rax sub $56087, %r13 mov (%rax), %ebx nop nop nop nop nop mfence lea addresses_WT_ht+0x16732, %rdi nop nop nop nop nop add %r13, %r13 movups (%rdi), %xmm7 vpextrq $1, %xmm7, %r11 nop nop nop nop nop xor %r11, %r11 lea addresses_normal_ht+0x193c2, %rsi lea addresses_normal_ht+0x18b32, %rdi nop nop nop dec %r14 mov $41, %rcx rep movsq nop nop nop nop xor %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r15 push %rbx push %rdx // Faulty Load lea addresses_PSE+0x1bf32, %r15 nop nop nop nop nop add $59368, %r14 mov (%r15), %rdx lea oracles, %r12 and $0xff, %rdx shlq $12, %rdx mov (%r12,%rdx,1), %rdx pop %rdx pop %rbx pop %r15 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_PSE', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 10}} {'dst': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
Transynther/x86/_processed/NC/_st_zr_un_sm_/i9-9900K_12_0xca.log_21829_1593.asm
ljhsiun2/medusa
9
8997
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x19220, %r11 clflush (%r11) nop xor $41293, %r15 mov $0x6162636465666768, %r8 movq %r8, %xmm3 movups %xmm3, (%r11) xor %rbx, %rbx lea addresses_UC_ht+0x17a81, %rsi lea addresses_WT_ht+0x12d97, %rdi nop nop add $52337, %r8 mov $54, %rcx rep movsq nop nop xor $36137, %r11 lea addresses_A_ht+0xc981, %rsi lea addresses_WT_ht+0x13181, %rdi nop nop xor %r14, %r14 mov $88, %rcx rep movsb add $31834, %r8 lea addresses_WC_ht+0xb181, %rsi clflush (%rsi) nop nop xor $19379, %rbx mov $0x6162636465666768, %r11 movq %r11, %xmm1 and $0xffffffffffffffc0, %rsi vmovntdq %ymm1, (%rsi) nop nop cmp %rsi, %rsi lea addresses_D_ht+0x1badf, %r11 clflush (%r11) nop nop cmp %rdi, %rdi movw $0x6162, (%r11) nop nop sub $27036, %rsi lea addresses_A_ht+0x383e, %rsi lea addresses_A_ht+0x97c1, %rdi nop nop nop nop nop and $30657, %r8 mov $75, %rcx rep movsl nop xor $7072, %rbx lea addresses_WT_ht+0xbc81, %r14 nop nop nop nop xor $62257, %rsi movw $0x6162, (%r14) nop nop nop add $47291, %rbx lea addresses_WC_ht+0x1e2c1, %r15 nop nop nop nop and %rcx, %rcx mov (%r15), %r14d nop nop nop inc %rsi lea addresses_WT_ht+0xd781, %r11 nop nop nop nop cmp %rbx, %rbx mov $0x6162636465666768, %rdi movq %rdi, %xmm4 vmovups %ymm4, (%r11) nop nop nop nop cmp %rbx, %rbx lea addresses_UC_ht+0xb381, %rsi lea addresses_WC_ht+0xb811, %rdi clflush (%rdi) add $27299, %rbx mov $20, %rcx rep movsq nop nop add $63291, %rsi lea addresses_D_ht+0xd8cc, %rbx nop nop nop xor $15913, %r8 movw $0x6162, (%rbx) nop nop nop sub $22335, %r11 lea addresses_D_ht+0x1aa21, %r15 nop nop nop sub $52398, %r14 movl $0x61626364, (%r15) nop dec %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %rdi push %rdx push %rsi // Store mov $0x3aaf7c0000000181, %r11 clflush (%r11) nop nop nop nop nop add %r14, %r14 mov $0x5152535455565758, %rdi movq %rdi, %xmm6 vmovups %ymm6, (%r11) nop nop xor %rdx, %rdx // Store lea addresses_A+0x10a31, %r14 add %r13, %r13 mov $0x5152535455565758, %rdx movq %rdx, %xmm6 movups %xmm6, (%r14) nop nop nop nop cmp $45494, %r11 // Load lea addresses_WT+0x18f81, %r13 xor $49996, %r12 vmovaps (%r13), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi nop nop nop nop cmp $62122, %rdi // Store lea addresses_US+0x6371, %r11 nop nop nop nop nop dec %r13 mov $0x5152535455565758, %rdx movq %rdx, %xmm6 movups %xmm6, (%r11) nop nop cmp %r13, %r13 // Store lea addresses_WC+0x10201, %r12 nop nop nop nop add %r13, %r13 movw $0x5152, (%r12) nop nop nop nop nop cmp $38588, %r12 // Faulty Load mov $0x3aaf7c0000000181, %r13 nop xor $30267, %r12 mov (%r13), %rsi lea oracles, %r11 and $0xff, %rsi shlq $12, %rsi mov (%r11,%rsi,1), %rsi pop %rsi pop %rdx pop %rdi pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': True, 'congruent': 7}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 6}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 1}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': True, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': True, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 9}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'f0': 1, '00': 140, '58': 21688} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
src/FluentTranslate.Parser/grammars/FluentParser.g4
emphasis87/FluentTranslate
0
1263
parser grammar FluentParser; options { tokenVocab = FluentLexer; contextSuperClass = FluentTranslate.Parser.FluentParserContext; } /* * Parser Rules */ resource : entry* EOF ; entry : ( term | message | comment | emptyLine ) ; comment : COMMENT_OPEN COMMENT NL? ; term : TERM record expressionList attributeList? NL? ; message : record expressionList? attributeList? NL? ; record : IDENTIFIER INDENT? EQUALS INDENT? ; attributeList : attribute+ ; attribute : ws indent ATTRIBUTE record expressionList ; expressionList : expression+ ; expression : text | placeable ; text : ws TEXT ; indent : ( INDENT | NL_INDENT ) ; ws : ( INDENT | NL | NL_INDENT )*? ; placeable : Prefix=ws PLACEABLE_OPEN ws placeableExpression ws PLACEABLE_CLOSE ; placeableExpression : selectExpression | inlineExpression ; selectExpression : inlineExpression ws SELECTOR ws variantList ; variantList : (ws variant)* ws defaultVariant (ws variant)* ; defaultVariant : VARIANT_DEFAULT variant ; variant : VARIANT_OPEN INDENT? ( identifier | NUMBER_LITERAL ) INDENT? VARIANT_CLOSE expressionList ; identifier : IDENTIFIER_REF ; inlineExpression : stringLiteral | numberLiteral | functionCall | variableReference | termReference | messageReference | placeable ; stringLiteral : STRING_OPEN ( ESCAPED_CHAR | UNICODE_ESCAPE | QUOTED_STRING )* STRING_CLOSE ; numberLiteral : NUMBER_LITERAL ; variableReference : VARIABLE_REF IDENTIFIER_REF ; termReference : TERM_REF recordReference argumentList? ; messageReference : recordReference ; recordReference : IDENTIFIER_REF attributeAccessor? ; attributeAccessor : ATTRIBUTE_REF IDENTIFIER_REF ; functionCall : IDENTIFIER_REF argumentList ; argumentList : ws CALL_OPEN ( argument ws CALL_ARG_SEP )* argument? ws CALL_CLOSE ; argument : ws ( namedArgument | argumentExpression ) ; namedArgument : IDENTIFIER_REF ws CALL_ARG_NAME_SEP ws argumentExpression ; argumentExpression : inlineExpression ; emptyLine : INDENT? ( NL | NL_INDENT ) ;
mat/src/mat-consoles.adb
stcarrez/mat
7
27562
----------------------------------------------------------------------- -- mat-consoles - Console interface -- Copyright (C) 2014, 2015 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings; with MAT.Formats; package body MAT.Consoles is -- ------------------------------ -- Print the title for the given field and setup the associated field size. -- ------------------------------ procedure Print_Title (Console : in out Console_Type; Field : in Field_Type; Title : in String; Length : in Positive) is begin Console.Sizes (Field) := Length; if Console.Field_Count >= 1 then Console.Cols (Field) := Console.Cols (Console.Fields (Console.Field_Count)) + Console.Sizes (Console.Fields (Console.Field_Count)); else Console.Cols (Field) := 1; end if; Console.Field_Count := Console.Field_Count + 1; Console.Fields (Console.Field_Count) := Field; Console_Type'Class (Console).Print_Title (Field, Title); end Print_Title; -- ------------------------------ -- Format the address and print it for the given field. -- ------------------------------ procedure Print_Field (Console : in out Console_Type; Field : in Field_Type; Addr : in MAT.Types.Target_Addr) is Value : constant String := MAT.Formats.Addr (Addr); begin Console_Type'Class (Console).Print_Field (Field, Value); end Print_Field; -- ------------------------------ -- Format the address range and print it for the given field. -- ------------------------------ procedure Print_Field (Console : in out Console_Type; Field : in Field_Type; From : in MAT.Types.Target_Addr; To : in MAT.Types.Target_Addr) is From_Value : constant String := MAT.Formats.Addr (From); To_Value : constant String := MAT.Formats.Addr (To); begin Console_Type'Class (Console).Print_Field (Field, From_Value & "-" & To_Value); end Print_Field; -- ------------------------------ -- Format the size and print it for the given field. -- ------------------------------ procedure Print_Size (Console : in out Console_Type; Field : in Field_Type; Size : in MAT.Types.Target_Size) is Value : constant String := MAT.Formats.Size (Size); begin Console_Type'Class (Console).Print_Field (Field, Value); end Print_Size; -- ------------------------------ -- Format the thread information and print it for the given field. -- ------------------------------ procedure Print_Thread (Console : in out Console_Type; Field : in Field_Type; Thread : in MAT.Types.Target_Thread_Ref) is Value : constant String := MAT.Types.Target_Thread_Ref'Image (Thread); begin Console_Type'Class (Console).Print_Field (Field, Value); end Print_Thread; -- ------------------------------ -- Format the time tick as a duration and print it for the given field. -- ------------------------------ procedure Print_Duration (Console : in out Console_Type; Field : in Field_Type; Duration : in MAT.Types.Target_Tick_Ref) is Value : constant String := MAT.Formats.Duration (Duration); begin Console_Type'Class (Console).Print_Field (Field, Value); end Print_Duration; -- ------------------------------ -- Format the integer and print it for the given field. -- ------------------------------ procedure Print_Field (Console : in out Console_Type; Field : in Field_Type; Value : in Integer; Justify : in Justify_Type := J_LEFT) is Val : constant String := Util.Strings.Image (Value); begin Console_Type'Class (Console).Print_Field (Field, Val, Justify); end Print_Field; -- ------------------------------ -- Format the integer and print it for the given field. -- ------------------------------ procedure Print_Field (Console : in out Console_Type; Field : in Field_Type; Value : in Ada.Strings.Unbounded.Unbounded_String; Justify : in Justify_Type := J_LEFT) is Item : String := Ada.Strings.Unbounded.To_String (Value); Size : constant Natural := Console.Sizes (Field); begin if Size <= Item'Length then Item (Item'Last - Size + 2 .. Item'Last - Size + 4) := "..."; Console_Type'Class (Console).Print_Field (Field, Item (Item'Last - Size + 2 .. Item'Last)); else Console_Type'Class (Console).Print_Field (Field, Item, Justify); end if; end Print_Field; -- ------------------------------ -- Get the field count that was setup through the Print_Title calls. -- ------------------------------ function Get_Field_Count (Console : in Console_Type) return Natural is begin return Console.Field_Count; end Get_Field_Count; -- ------------------------------ -- Reset the field count. -- ------------------------------ procedure Clear_Fields (Console : in out Console_Type) is begin Console.Field_Count := 0; end Clear_Fields; end MAT.Consoles;
Transynther/x86/_processed/P/_zr_/i7-7700_9_0x48_notsx.log_1540_809.asm
ljhsiun2/medusa
9
162600
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r15 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x9395, %rsi lea addresses_WT_ht+0x1e065, %rdi nop nop nop nop nop cmp %rdx, %rdx mov $51, %rcx rep movsw nop nop nop nop nop xor %rbp, %rbp lea addresses_WT_ht+0x1a65d, %rsi lea addresses_WC_ht+0x100d1, %rdi nop sub $35916, %r15 mov $72, %rcx rep movsw nop nop nop nop add %rdx, %rdx lea addresses_A_ht+0x16ee5, %rsi lea addresses_A_ht+0x1bc65, %rdi clflush (%rsi) inc %rdx mov $65, %rcx rep movsw nop nop nop xor $6442, %rdx lea addresses_D_ht+0xb00c, %r15 nop nop inc %rdi mov (%r15), %ecx nop cmp $13030, %rdx lea addresses_normal_ht+0x16d76, %rsi lea addresses_WC_ht+0x4e65, %rdi nop and $54095, %rbx mov $45, %rcx rep movsb nop nop nop add $2086, %rbp lea addresses_D_ht+0x3e65, %rbx nop nop inc %rdx vmovups (%rbx), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rcx nop nop nop nop nop xor %rbx, %rbx lea addresses_UC_ht+0x9a65, %r15 nop sub %rcx, %rcx movl $0x61626364, (%r15) nop nop and %rbx, %rbx lea addresses_A_ht+0xa565, %rcx nop xor %rdi, %rdi mov (%rcx), %esi dec %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 ret .global s_faulty_load s_faulty_load: push %r13 push %r8 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi // Store lea addresses_PSE+0x11b48, %rax nop xor $16735, %rsi movw $0x5152, (%rax) nop nop add %rbp, %rbp // Store lea addresses_WC+0x1605, %rax inc %rsi mov $0x5152535455565758, %r13 movq %r13, (%rax) nop nop nop and $6561, %rbx // REPMOV lea addresses_A+0x124e3, %rsi lea addresses_A+0x1deb1, %rdi cmp $28458, %r8 mov $12, %rcx rep movsw nop nop nop and $58839, %r13 // Load lea addresses_D+0x3e65, %rcx add %rax, %rax mov (%rcx), %bp nop add %rsi, %rsi // Store lea addresses_PSE+0xde65, %rcx nop nop nop nop sub %rbx, %rbx movw $0x5152, (%rcx) nop nop nop nop nop sub $57593, %r8 // REPMOV lea addresses_WC+0x14225, %rsi lea addresses_normal+0x1ed95, %rdi nop nop xor $34745, %rbp mov $82, %rcx rep movsb nop nop nop nop nop dec %rdi // Store lea addresses_UC+0x181a5, %rcx nop nop nop nop nop sub $55293, %rsi movw $0x5152, (%rcx) nop nop dec %rax // Store lea addresses_WC+0xd665, %rax nop nop and %rbp, %rbp movb $0x51, (%rax) and %rbp, %rbp // Faulty Load mov $0xe65, %rax nop nop nop dec %rbp mov (%rax), %r8w lea oracles, %rbx and $0xff, %r8 shlq $12, %r8 mov (%rbx,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r8 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_PSE', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_A'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D', 'congruent': 5}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': True, 'congruent': 1, 'type': 'addresses_normal'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WC'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC', 'congruent': 11}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_P', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}} {'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}} {'dst': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 0}} {'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 9}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 7}} {'00': 1540} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
src/fot/FOTC/Program/ABP/CorrectnessProofATP.agda
asr/fotc
11
6896
<reponame>asr/fotc<filename>src/fot/FOTC/Program/ABP/CorrectnessProofATP.agda ------------------------------------------------------------------------------ -- The alternating bit protocol (ABP) is correct ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- This module proves the correctness of the ABP following the -- formalization in Dybjer and Sander (1989). -- N.B This module does not contain combined proofs, but it imports -- modules which contain combined proofs. module FOTC.Program.ABP.CorrectnessProofATP where open import FOTC.Base open import FOTC.Base.List open import FOTC.Data.Bool open import FOTC.Data.Bool.PropertiesATP using ( not-Bool ) open import FOTC.Data.Stream.Type open import FOTC.Data.Stream.Equality.PropertiesATP open import FOTC.Program.ABP.ABP open import FOTC.Program.ABP.Lemma1ATP open import FOTC.Program.ABP.Lemma2ATP open import FOTC.Program.ABP.Fair.Type open import FOTC.Program.ABP.Terms open import FOTC.Relation.Binary.Bisimilarity.Type ------------------------------------------------------------------------------ -- Main theorem. abpCorrect : ∀ {b os₁ os₂ is} → Bit b → Fair os₁ → Fair os₂ → Stream is → is ≈ abpTransfer b os₁ os₂ is abpCorrect {b} {os₁} {os₂} {is} Bb Fos₁ Fos₂ Sis = ≈-coind B h₁ h₂ where postulate h₁ : ∀ {ks ls} → B ks ls → ∃[ k' ] ∃[ ks' ] ∃[ ls' ] ks ≡ k' ∷ ks' ∧ ls ≡ k' ∷ ls' ∧ B ks' ls' {-# ATP prove h₁ lemma₁ lemma₂ not-Bool #-} postulate h₂ : B is (abpTransfer b os₁ os₂ is) {-# ATP prove h₂ #-} ------------------------------------------------------------------------------ -- abpTransfer produces a Stream. postulate abpTransfer-Stream : ∀ {b os₁ os₂ is} → Bit b → Fair os₁ → Fair os₂ → Stream is → Stream (abpTransfer b os₁ os₂ is) {-# ATP prove abpTransfer-Stream ≈→Stream₂ abpCorrect #-} ------------------------------------------------------------------------------ -- References -- -- <NAME> Sander, <NAME>. (1989). A Functional -- Programming Approach to the Specification and Verification of -- Concurrent Systems. Formal Aspects of Computing 1, pp. 303–319.
source/sql/mysql/matreshka-internals-sql_drivers-mysql-queries.adb
svn2github/matreshka
24
17454
<reponame>svn2github/matreshka ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- SQL Database Access -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with League.Calendars.ISO_8601; with Matreshka.Internals.SQL_Drivers.MySQL.Databases; with Matreshka.Internals.SQL_Parameter_Rewriters.MySQL; package body Matreshka.Internals.SQL_Drivers.MySQL.Queries is use type Interfaces.C.int; use type League.Calendars.ISO_8601.Nanosecond_100_Number; procedure Set_MySQL_Stmt_Error (Self : not null access MySQL_Query'Class); -- Sets error message to reported by database. function To_Address is new Ada.Unchecked_Conversion (Interfaces.C.Strings.chars_ptr, System.Address); function To_chars_ptr is new Ada.Unchecked_Conversion (System.Address, Interfaces.C.Strings.chars_ptr); procedure Free is new Ada.Unchecked_Deallocation (MYSQL_BIND_Array, MYSQL_BIND_Array_Access); procedure Free is new Ada.Unchecked_Deallocation (Value_Array, Value_Array_Access); Rewriter : SQL_Parameter_Rewriters.MySQL.MySQL_Parameter_Rewriter; -- SQL statement parameter rewriter. ---------------- -- Bind_Value -- ---------------- overriding procedure Bind_Value (Self : not null access MySQL_Query; Name : League.Strings.Universal_String; Value : League.Holders.Holder; Direction : SQL.Parameter_Directions) is pragma Unreferenced (Direction); -- Only 'in' parameters are supported now. begin Self.Parameters.Set_Value (Name, Value); end Bind_Value; ----------------- -- Bound_Value -- ----------------- overriding function Bound_Value (Self : not null access MySQL_Query; Name : League.Strings.Universal_String) return League.Holders.Holder is begin raise Program_Error; return League.Holders.Empty_Holder; end Bound_Value; ------------------- -- Error_Message -- ------------------- overriding function Error_Message (Self : not null access MySQL_Query) return League.Strings.Universal_String is begin return Self.Error; end Error_Message; ------------- -- Execute -- ------------- overriding function Execute (Self : not null access MySQL_Query) return Boolean is Value : League.Holders.Holder; Binds : MYSQL_BIND_Array (1 .. Self.Parameters.Number_Of_Positional); Values : Value_Array (1 .. Self.Parameters.Number_Of_Positional); Aux : Interfaces.C.Strings.chars_ptr; Result : Interfaces.C.int; begin -- Prepare data for parameters when necessary. for J in Binds'Range loop Value := Self.Parameters.Value (J); if League.Holders.Is_Empty (Value) then Binds (J).buffer_type := MYSQL_TYPE_NULL; elsif League.Holders.Is_Universal_String (Value) then Aux := Interfaces.C.Strings.New_String (League.Holders.Element (Value).To_UTF_8_String); Values (J).Length_Value := Interfaces.C.unsigned_long (Interfaces.C.Strings.Strlen (Aux)); Binds (J).buffer_type := MYSQL_TYPE_STRING; Binds (J).buffer := To_Address (Aux); Binds (J).length := Values (J).Length_Value'Unchecked_Access; elsif League.Holders.Is_Abstract_Integer (Value) then Values (J).Long_Long_Value := Interfaces.Integer_64 (League.Holders.Universal_Integer' (League.Holders.Element (Value))); Binds (J).buffer_type := MYSQL_TYPE_LONGLONG; Binds (J).is_unsigned := 0; Binds (J).buffer := Values (J).Long_Long_Value'Address; elsif League.Holders.Is_Abstract_Float (Value) then Values (J).Double_Value := Interfaces.C.double (League.Holders.Universal_Float' (League.Holders.Element (Value))); Binds (J).buffer_type := MYSQL_TYPE_DOUBLE; Binds (J).buffer := Values (J).Double_Value'Address; elsif League.Holders.Is_Date (Value) then declare Aux : constant League.Calendars.Date := League.Holders.Element (Value); Year : League.Calendars.ISO_8601.Year_Number; Month : League.Calendars.ISO_8601.Month_Number; Day : League.Calendars.ISO_8601.Day_Number; begin League.Calendars.ISO_8601.Split (Aux, Year, Month, Day); Values (J).Time_Value := (year => Interfaces.C.unsigned (Year), month => Interfaces.C.unsigned (Month), day => Interfaces.C.unsigned (Day), hour => 0, minute => 0, second => 0, second_part => 0, neg => 0, time_type => MYSQL_TIMESTAMP_DATE); Binds (J).buffer_type := MYSQL_TYPE_DATE; Binds (J).buffer := Values (J).Time_Value'Address; end; elsif League.Holders.Is_Date_Time (Value) then declare Aux : constant League.Calendars.Date_Time := League.Holders.Element (Value); Year : League.Calendars.ISO_8601.Year_Number; Month : League.Calendars.ISO_8601.Month_Number; Day : League.Calendars.ISO_8601.Day_Number; Hour : League.Calendars.ISO_8601.Hour_Number; Minute : League.Calendars.ISO_8601.Minute_Number; Second : League.Calendars.ISO_8601.Second_Number; Fraction : League.Calendars.ISO_8601.Nanosecond_100_Number; begin -- XXX UTC time zone must be specified here. League.Calendars.ISO_8601.Split (Aux, Year, Month, Day, Hour, Minute, Second, Fraction); Values (J).Time_Value := (year => Interfaces.C.unsigned (Year), month => Interfaces.C.unsigned (Month), day => Interfaces.C.unsigned (Day), hour => Interfaces.C.unsigned (Hour), minute => Interfaces.C.unsigned (Minute), second => Interfaces.C.unsigned (Second), second_part => Interfaces.C.unsigned_long (Fraction / 10), neg => 0, time_type => MYSQL_TIMESTAMP_DATETIME); Binds (J).buffer_type := MYSQL_TYPE_DATETIME; Binds (J).buffer := Values (J).Time_Value'Address; end; elsif League.Holders.Is_Time (Value) then declare Aux : constant League.Calendars.Time := League.Holders.Element (Value); begin Values (J).Time_Value := (year => 0, month => 0, day => 0, hour => Interfaces.C.unsigned (League.Calendars.ISO_8601.Hour (Aux)), minute => Interfaces.C.unsigned (League.Calendars.ISO_8601.Minute (Aux)), second => Interfaces.C.unsigned (League.Calendars.ISO_8601.Second (Aux)), second_part => Interfaces.C.unsigned_long (League.Calendars.ISO_8601.Nanosecond_100 (Aux) / 10), neg => 0, time_type => MYSQL_TIMESTAMP_TIME); Binds (J).buffer_type := MYSQL_TYPE_TIME; Binds (J).buffer := Values (J).Time_Value'Address; end; end if; end loop; -- Bind data for parameters when necessary if Binds'Length /= 0 then if mysql_stmt_bind_param (Self.Handle, Binds (1)'Access) /= 0 then Self.Set_MySQL_Stmt_Error; return False; end if; end if; Result := mysql_stmt_execute (Self.Handle); -- Cleanup data for parameters. for J in Binds'Range loop -- Actual data is allocated dynamically for string only, release all -- used memory. if Binds (J).buffer_type = MYSQL_TYPE_STRING then Aux := To_chars_ptr (Binds (J).buffer); Interfaces.C.Strings.Free (Aux); end if; end loop; if Result /= 0 then Self.Set_MySQL_Stmt_Error; return False; end if; Self.Is_Active := True; Self.Is_Valid := False; return True; end Execute; ------------ -- Finish -- ------------ overriding procedure Finish (Self : not null access MySQL_Query) is begin raise Program_Error; end Finish; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : not null access MySQL_Query'Class; Database : not null access Databases.MySQL_Database'Class) is begin SQL_Drivers.Initialize (Self, Database_Access (Database)); Self.Is_Active := False; Self.Is_Valid := False; end Initialize; ---------------- -- Invalidate -- ---------------- overriding procedure Invalidate (Self : not null access MySQL_Query) is Aux : Interfaces.C.Strings.chars_ptr; begin if Self.Database /= null and Self.Handle /= null then if mysql_stmt_close (Self.Handle) /= 0 then Self.Set_MySQL_Stmt_Error; Self.Handle := null; end if; Self.Parameters.Clear; if Self.Result /= null then for J in Self.Result'Range loop if Self.Result (J).buffer_type = MYSQL_TYPE_VAR_STRING then Aux := To_chars_ptr (Self.Result (J).buffer); Interfaces.C.Strings.Free (Aux); end if; end loop; Free (Self.Result); end if; Free (Self.Buffer); end if; -- Call Invalidate of parent tagged type. Abstract_Query (Self.all).Invalidate; end Invalidate; --------------- -- Is_Active -- --------------- overriding function Is_Active (Self : not null access MySQL_Query) return Boolean is begin return Self.Is_Active; end Is_Active; -------------- -- Is_Valid -- -------------- overriding function Is_Valid (Self : not null access MySQL_Query) return Boolean is begin return Self.Is_Valid; end Is_Valid; ---------- -- Next -- ---------- overriding function Next (Self : not null access MySQL_Query) return Boolean is Result : Interfaces.C.int; begin if Self.Result = null then return False; end if; Result := mysql_stmt_fetch (Self.Handle); if Result = 0 then Self.Is_Valid := True; return True; elsif Result = MYSQL_NO_Data then Self.Is_Valid := False; return False; else Self.Is_Valid := False; Self.Set_MySQL_Stmt_Error; return False; end if; end Next; ------------- -- Prepare -- ------------- overriding function Prepare (Self : not null access MySQL_Query; Query : League.Strings.Universal_String) return Boolean is Rewritten : League.Strings.Universal_String; C_Query : Interfaces.C.Strings.chars_ptr; Count : Natural; Result : MYSQL_RES_Access; Field : MYSQL_FIELD_Access; begin -- Rewrite statement and prepare set of parameters. Rewriter.Rewrite (Query, Rewritten, Self.Parameters); -- Convert rewritten statement into string in client library format. C_Query := Interfaces.C.Strings.New_String (Rewritten.To_UTF_8_String); -- Allocate statement. Self.Handle := mysql_stmt_init (Databases.MySQL_Database'Class (Self.Database.all).Database_Handle); if Self.Handle = null then Self.Error := League.Strings.To_Universal_String ("out of memory"); return False; end if; -- Prepare statement. if mysql_stmt_prepare (Self.Handle, C_Query, Interfaces.C.unsigned_long (Interfaces.C.Strings.Strlen (C_Query))) /= 0 then Interfaces.C.Strings.Free (C_Query); Self.Set_MySQL_Stmt_Error; return False; end if; Interfaces.C.Strings.Free (C_Query); -- Check number of parameters. Count := Natural (mysql_stmt_param_count (Self.Handle)); if Count /= Self.Parameters.Number_Of_Positional then Self.Error := League.Strings.To_Universal_String ("invalid use of parameter placeholder"); return False; end if; -- Prepare storage for result. Result := mysql_stmt_result_metadata (Self.Handle); if Result /= null then Count := Natural (mysql_num_fields (Result)); Self.Result := new MYSQL_BIND_Array (1 .. Count); Initialize (Self.Result.all); Self.Buffer := new Value_Array (1 .. Count); for J in Self.Result'Range loop Field := mysql_fetch_field (Result); case Field.field_type is when MYSQL_TYPE_DECIMAL => raise Program_Error; when MYSQL_TYPE_TINY => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_TINY; Self.Result (J).is_unsigned := 0; Self.Result (J).buffer := Self.Buffer (J).Tiny_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_SHORT => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_SHORT; Self.Result (J).is_unsigned := 0; Self.Result (J).buffer := Self.Buffer (J).Short_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_LONG => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_LONG; Self.Result (J).is_unsigned := 0; Self.Result (J).buffer := Self.Buffer (J).Long_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_FLOAT => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_FLOAT; Self.Result (J).buffer := Self.Buffer (J).Float_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_DOUBLE => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_DOUBLE; Self.Result (J).buffer := Self.Buffer (J).Double_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_NULL => raise Program_Error; when MYSQL_TYPE_TIMESTAMP => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_TIMESTAMP; Self.Result (J).buffer := Self.Buffer (J).Time_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_LONGLONG => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_LONGLONG; Self.Result (J).is_unsigned := 0; Self.Result (J).buffer := Self.Buffer (J).Long_Long_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_INT24 => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_INT24; Self.Result (J).is_unsigned := 0; Self.Result (J).buffer := Self.Buffer (J).Int_24_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_DATE => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_DATE; Self.Result (J).buffer := Self.Buffer (J).Time_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_TIME => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_TIME; Self.Result (J).buffer := Self.Buffer (J).Time_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_DATETIME => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_DATETIME; Self.Result (J).buffer := Self.Buffer (J).Time_Value'Address; Self.Result (J).buffer_length := 0; when MYSQL_TYPE_YEAR => raise Program_Error; when MYSQL_TYPE_NEWDATE => raise Program_Error; when MYSQL_TYPE_VARCHAR => raise Program_Error; when MYSQL_TYPE_BIT => raise Program_Error; when MYSQL_TYPE_NEWDECIMAL => raise Program_Error; when MYSQL_TYPE_ENUM => raise Program_Error; when MYSQL_TYPE_SET => raise Program_Error; when MYSQL_TYPE_TINY_BLOB => raise Program_Error; when MYSQL_TYPE_MEDIUM_BLOB => raise Program_Error; when MYSQL_TYPE_LONG_BLOB => raise Program_Error; when MYSQL_TYPE_BLOB => raise Program_Error; when MYSQL_TYPE_VAR_STRING => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_VAR_STRING; Self.Result (J).buffer := To_Address (Interfaces.C.Strings.New_String ((1 .. Natural (Field.length) => ' '))); Self.Result (J).buffer_length := Field.length; Self.Result (J).length := Self.Buffer (J).Length_Value'Unchecked_Access; when MYSQL_TYPE_STRING => Self.Result (J).is_null := Self.Buffer (J).Null_Value'Access; Self.Result (J).buffer_type := MYSQL_TYPE_STRING; Self.Result (J).buffer := To_Address (Interfaces.C.Strings.New_String ((1 .. Natural (Field.length) => ' '))); Self.Result (J).buffer_length := Field.length; Self.Result (J).length := Self.Buffer (J).Length_Value'Unchecked_Access; when MYSQL_TYPE_GEOMETRY => raise Program_Error; end case; end loop; mysql_free_result (Result); -- Bind buffers. if mysql_stmt_bind_result (Self.Handle, Self.Result (1)'Access) /= 0 then Self.Set_MySQL_Stmt_Error; return False; end if; end if; return True; end Prepare; -------------------------- -- Set_MySQL_Stmt_Error -- -------------------------- procedure Set_MySQL_Stmt_Error (Self : not null access MySQL_Query'Class) is Error : constant String := Interfaces.C.Strings.Value (mysql_stmt_error (Self.Handle)); begin Self.Error := League.Strings.From_UTF_8_String (Error); end Set_MySQL_Stmt_Error; ----------- -- Value -- ----------- overriding function Value (Self : not null access MySQL_Query; Index : Positive) return League.Holders.Holder is Value : League.Holders.Holder; begin -- Return empty holder when there is not data or index is out of range. if Self.Result = null or Index > Self.Result'Last then return League.Holders.Empty_Holder; end if; -- Extract requested value. case Self.Result (Index).buffer_type is when MYSQL_TYPE_DECIMAL => raise Program_Error; when MYSQL_TYPE_TINY => -- Process integer (TINY) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Integer_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Integer (Self.Buffer (Index).Tiny_Value)); end if; when MYSQL_TYPE_SHORT => -- Process integer (SHORT) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Integer_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Integer (Self.Buffer (Index).Short_Value)); end if; when MYSQL_TYPE_LONG => -- Process integer (LONG) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Integer_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Integer (Self.Buffer (Index).Long_Value)); end if; when MYSQL_TYPE_FLOAT => -- Process float (FLOAT) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Float_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Float (Self.Buffer (Index).Float_Value)); end if; when MYSQL_TYPE_DOUBLE => -- Process float (DOUBLE) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Float_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Float (Self.Buffer (Index).Double_Value)); end if; when MYSQL_TYPE_NULL => raise Program_Error; when MYSQL_TYPE_TIMESTAMP => -- Process TIMESTAMP. League.Holders.Set_Tag (Value, League.Holders.Date_Time_Tag); if Self.Buffer (Index).Null_Value = 0 then -- XXX UTC time zone must be specified here. League.Holders.Replace_Element (Value, League.Calendars.ISO_8601.Create (League.Calendars.ISO_8601.Year_Number (Self.Buffer (Index).Time_Value.year), League.Calendars.ISO_8601.Month_Number (Self.Buffer (Index).Time_Value.month), League.Calendars.ISO_8601.Day_Number (Self.Buffer (Index).Time_Value.day), League.Calendars.ISO_8601.Hour_Number (Self.Buffer (Index).Time_Value.hour), League.Calendars.ISO_8601.Minute_Number (Self.Buffer (Index).Time_Value.minute), League.Calendars.ISO_8601.Second_Number (Self.Buffer (Index).Time_Value.second), League.Calendars.ISO_8601.Nanosecond_100_Number (Self.Buffer (Index).Time_Value.second_part) * 10)); end if; when MYSQL_TYPE_LONGLONG => -- Process integer (LONGLONG) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Integer_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Integer (Self.Buffer (Index).Long_Long_Value)); end if; when MYSQL_TYPE_INT24 => -- Process integer (INT24) data. League.Holders.Set_Tag (Value, League.Holders.Universal_Integer_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Holders.Universal_Integer (Self.Buffer (Index).Int_24_Value)); end if; when MYSQL_TYPE_DATE => -- Process DATE. League.Holders.Set_Tag (Value, League.Holders.Date_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Calendars.ISO_8601.Create (League.Calendars.ISO_8601.Year_Number (Self.Buffer (Index).Time_Value.year), League.Calendars.ISO_8601.Month_Number (Self.Buffer (Index).Time_Value.month), League.Calendars.ISO_8601.Day_Number (Self.Buffer (Index).Time_Value.day))); end if; when MYSQL_TYPE_TIME => -- Process TIME. League.Holders.Set_Tag (Value, League.Holders.Time_Tag); -- XXX TIME is not supported. when MYSQL_TYPE_DATETIME => -- Process DATETIME. League.Holders.Set_Tag (Value, League.Holders.Date_Time_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Calendars.ISO_8601.Create (League.Calendars.ISO_8601.Year_Number (Self.Buffer (Index).Time_Value.year), League.Calendars.ISO_8601.Month_Number (Self.Buffer (Index).Time_Value.month), League.Calendars.ISO_8601.Day_Number (Self.Buffer (Index).Time_Value.day), League.Calendars.ISO_8601.Hour_Number (Self.Buffer (Index).Time_Value.hour), League.Calendars.ISO_8601.Minute_Number (Self.Buffer (Index).Time_Value.minute), League.Calendars.ISO_8601.Second_Number (Self.Buffer (Index).Time_Value.second), League.Calendars.ISO_8601.Nanosecond_100_Number (Self.Buffer (Index).Time_Value.second_part) * 10)); end if; when MYSQL_TYPE_YEAR => raise Program_Error; when MYSQL_TYPE_NEWDATE => raise Program_Error; when MYSQL_TYPE_VARCHAR => raise Program_Error; when MYSQL_TYPE_BIT => raise Program_Error; when MYSQL_TYPE_NEWDECIMAL => raise Program_Error; when MYSQL_TYPE_ENUM => raise Program_Error; when MYSQL_TYPE_SET => raise Program_Error; when MYSQL_TYPE_TINY_BLOB => raise Program_Error; when MYSQL_TYPE_MEDIUM_BLOB => raise Program_Error; when MYSQL_TYPE_LONG_BLOB => raise Program_Error; when MYSQL_TYPE_BLOB => raise Program_Error; when MYSQL_TYPE_VAR_STRING => -- Process text data. League.Holders.Set_Tag (Value, League.Holders.Universal_String_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Strings.From_UTF_8_String (Interfaces.C.Strings.Value (To_chars_ptr (Self.Result (Index).buffer), Interfaces.C.size_t (Self.Buffer (Index).Length_Value)))); end if; when MYSQL_TYPE_STRING => -- Process text data. League.Holders.Set_Tag (Value, League.Holders.Universal_String_Tag); if Self.Buffer (Index).Null_Value = 0 then League.Holders.Replace_Element (Value, League.Strings.From_UTF_8_String (Interfaces.C.Strings.Value (To_chars_ptr (Self.Result (Index).buffer), Interfaces.C.size_t (Self.Buffer (Index).Length_Value)))); end if; when MYSQL_TYPE_GEOMETRY => raise Program_Error; end case; return Value; end Value; end Matreshka.Internals.SQL_Drivers.MySQL.Queries;
src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm
jbrandwood/kickc
2
163351
<filename>src/main/fragment/mos6502-common/_stackidxbool_vbuc1=vbom1.asm tsx lda {m1} sta STACK_BASE+{c1},x
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_3343_545.asm
ljhsiun2/medusa
9
88400
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %rsi lea addresses_A_ht+0xb20a, %r15 nop nop nop cmp %r12, %r12 mov (%r15), %esi nop nop xor $15306, %rsi pop %rsi pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %rax push %rbx push %rcx push %rdi // Store lea addresses_D+0x14964, %rdi nop nop nop xor %r11, %r11 mov $0x5152535455565758, %rbx movq %rbx, %xmm0 movups %xmm0, (%rdi) cmp $34256, %rcx // Store lea addresses_RW+0x1e928, %rcx nop nop and %rax, %rax mov $0x5152535455565758, %r11 movq %r11, (%rcx) nop nop nop nop nop sub %r11, %r11 // Load lea addresses_PSE+0xe6f8, %rcx nop sub $11258, %rbx movb (%rcx), %r11b nop nop and %rdi, %rdi // Faulty Load lea addresses_normal+0xe438, %rbx nop nop nop nop cmp %rax, %rax movaps (%rbx), %xmm0 vpextrq $1, %xmm0, %r11 lea oracles, %rax and $0xff, %r11 shlq $12, %r11 mov (%rax,%r11,1), %r11 pop %rdi pop %rcx pop %rbx pop %rax pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'00': 3343} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
Task/Flatten-a-list/Ada/flatten-a-list-2.ada
LaudateCorpus1/RosettaCodeData
1
3251
<gh_stars>1-10 with Ada.Strings.Unbounded; package body Nestable_Lists is procedure Append (L : in out List; E : Element_Type) is begin if L = null then L := new Node (Kind => Data_Node); L.Data := E; else Append (L.Next, E); end if; end Append; procedure Append (L : in out List; N : List) is begin if L = null then L := new Node (Kind => List_Node); L.Sublist := N; else Append (L.Next, N); end if; end Append; function Flatten (L : List) return List is Result : List; Current : List := L; Temp : List; begin while Current /= null loop case Current.Kind is when Data_Node => Append (Result, Current.Data); when List_Node => Temp := Flatten (Current.Sublist); while Temp /= null loop Append (Result, Temp.Data); Temp := Temp.Next; end loop; end case; Current := Current.Next; end loop; return Result; end Flatten; function New_List (E : Element_Type) return List is begin return new Node'(Kind => Data_Node, Data => E, Next => null); end New_List; function New_List (N : List) return List is begin return new Node'(Kind => List_Node, Sublist => N, Next => null); end New_List; function To_String (L : List) return String is Current : List := L; Result : Ada.Strings.Unbounded.Unbounded_String; begin Ada.Strings.Unbounded.Append (Result, "["); while Current /= null loop case Current.Kind is when Data_Node => Ada.Strings.Unbounded.Append (Result, To_String (Current.Data)); when List_Node => Ada.Strings.Unbounded.Append (Result, To_String (Current.Sublist)); end case; if Current.Next /= null then Ada.Strings.Unbounded.Append (Result, ", "); end if; Current := Current.Next; end loop; Ada.Strings.Unbounded.Append (Result, "]"); return Ada.Strings.Unbounded.To_String (Result); end To_String; end Nestable_Lists;
asg/asm/rdkafka_queue.asm
asgkafka/librdkafka
0
28745
*PROCESS DUPALIAS * * Compiled by DCC Version 2.25.07 Mar 6 2021 08:51:07 * on Fri Apr 30 15:35:54 2021 * WXTRN @@ZARCH# * * * * Code Section * @CODE ALIAS X'7CD9C4D2C1C6D2C16DD8E4C5E4C5' @CODE CSECT @CODE AMODE ANY @CODE RMODE ANY @DATA ALIAS X'7C998492818692816D98A485A485' write ALIAS C'write' EXTRN write __assert ALIAS C'@@ASSERT' EXTRN __assert rd_kafka_op2str ALIAS X'99846D92818692816D9697F2A2A399' EXTRN rd_kafka_op2str rd_kafka_op_destroy ALIAS X'99846D92818692816D96976D8485A2A39996A8' EXTRN rd_kafka_op_destroy _tthread_timespec_get ALIAS X'6DA3A388998581846DA3899485A29785836D8785A* 3' EXTRN _tthread_timespec_get mtx_init ALIAS X'94A3A76D899589A3' EXTRN mtx_init mtx_destroy ALIAS X'94A3A76D8485A2A39996A8' EXTRN mtx_destroy mtx_lock ALIAS X'94A3A76D93968392' EXTRN mtx_lock rd_kafka_op_reply ALIAS X'99846D92818692816D96976D99859793A8' EXTRN rd_kafka_op_reply fprintf ALIAS C'fprintf' EXTRN fprintf rd_kafka_poll_cb ALIAS X'99846D92818692816D979693936D8382' EXTRN rd_kafka_poll_cb mtx_unlock ALIAS X'94A3A76DA49593968392' EXTRN mtx_unlock cnd_init ALIAS X'8395846D899589A3' EXTRN cnd_init cnd_destroy ALIAS X'8395846D8485A2A39996A8' EXTRN cnd_destroy cnd_signal ALIAS X'8395846DA28987958193' EXTRN cnd_signal cnd_broadcast ALIAS X'8395846D82999681848381A2A3' EXTRN cnd_broadcast rd_kafka_toppar_destroy_final ALIAS X'99846D92818692816DA396979781996D8* 485A2A39996A86D8689958193' EXTRN rd_kafka_toppar_destroy_final rd_kafka_op_handle ALIAS X'99846D92818692816D96976D888195849385' EXTRN rd_kafka_op_handle rd_kafka_op_offset_store ALIAS X'99846D92818692816D96976D968686A285A36D* A2A3969985' EXTRN rd_kafka_op_offset_store rd_kafka_toppar_get2 ALIAS X'99846D92818692816DA396979781996D8785A3F2' EXTRN rd_kafka_toppar_get2 cnd_timedwait_abs ALIAS X'8395846DA389948584A68189A36D8182A2' EXTRN cnd_timedwait_abs calloc ALIAS C'calloc' EXTRN calloc free ALIAS C'free' EXTRN free malloc ALIAS C'malloc' EXTRN malloc rd_kafka_message_get ALIAS X'99846D92818692816D9485A2A28187856D8785A3' EXTRN rd_kafka_message_get gettimeofday ALIAS C'GETTFD@Y' EXTRN gettimeofday pthread_mutex_lock ALIAS C'@@PT3ML' EXTRN pthread_mutex_lock pthread_mutex_unlock ALIAS C'@@PT3MU' EXTRN pthread_mutex_unlock rd_kafka_crash ALIAS X'99846D92818692816D839981A288' EXTRN rd_kafka_crash * * * * ....... start of rd_atomic32_sub @LNAME1060 DS 0H DC X'0000000F' DC C'rd_atomic32_sub' DC X'00' rd_atomic32_sub DCCPRLG CINDEX=1060,BASER=12,FRAME=184,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1060 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * LG 2,0(0,3) ; ra * *** * *** int32_t r; * *** pthread_mutex_lock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1060_0 ; pthread_mutex_lock @@gen_label0 DS 0H BALR 14,15 @@gen_label1 DS 0H * *** ra->val -= v; L 15,0(0,2) S 15,12(0,3) ST 15,0(0,2) * *** r = ra->val; LR 3,15 ; ra * *** pthread_mutex_unlock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1060_1 ; pthread_mutex_unlock @@gen_label2 DS 0H BALR 14,15 @@gen_label3 DS 0H * *** return r; LGFR 15,3 * *** # 128 "C:\asgkafka\librdkafka\src\rdatomic.h" * *** return __atomic_sub_fetch(&ra->val, v, 6); * *** * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1060 DC F'184' @lit_1060_0 DC AD(pthread_mutex_lock) @lit_1060_1 DC AD(pthread_mutex_unlock) DROP 12 * * DSECT for automatic variables in "rd_atomic32_sub" * (FUNCTION #1060) * @AUTO#rd_atomic32_sub DSECT DS XL168 rd_atomic32_sub#r#0 DS 1F ; r * @CODE CSECT * * * * ....... start of rd_atomic32_get @LNAME1061 DS 0H DC X'0000000F' DC C'rd_atomic32_get' DC X'00' rd_atomic32_get DCCPRLG CINDEX=1061,BASER=12,FRAME=184,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1061 * ******* End of Prologue * * LG 2,0(0,1) ; ra * *** * *** int32_t r; * *** pthread_mutex_lock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1061_3 ; pthread_mutex_lock @@gen_label4 DS 0H BALR 14,15 @@gen_label5 DS 0H * *** r = ra->val; L 3,0(0,2) ; ra * *** pthread_mutex_unlock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1061_4 ; pthread_mutex_unlock @@gen_label6 DS 0H BALR 14,15 @@gen_label7 DS 0H * *** return r; LGFR 15,3 * *** # 157 "C:\asgkafka\librdkafka\src\rdatomic.h" * *** return __atomic_fetch_add(&ra->val, 0, 6); * *** * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1061 DC F'184' @lit_1061_3 DC AD(pthread_mutex_lock) @lit_1061_4 DC AD(pthread_mutex_unlock) DROP 12 * * DSECT for automatic variables in "rd_atomic32_get" * (FUNCTION #1061) * @AUTO#rd_atomic32_get DSECT DS XL168 rd_atomic32_get#r#0 DS 1F ; r * @CODE CSECT * * * * ....... start of rd_atomic64_set @LNAME1067 DS 0H DC X'0000000F' DC C'rd_atomic64_set' DC X'00' rd_atomic64_set DCCPRLG CINDEX=1067,BASER=12,FRAME=184,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1067 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * LG 2,0(0,3) ; ra * *** * *** int64_t r; * *** pthread_mutex_lock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1067_6 ; pthread_mutex_lock @@gen_label8 DS 0H BALR 14,15 @@gen_label9 DS 0H * *** ra->val = v; LG 15,8(0,3) ; v STG 15,0(0,2) ; ra * *** r = ra->val; LGR 3,15 ; ra * *** pthread_mutex_unlock(&ra->lock); LA 15,8(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1067_7 ; pthread_mutex_unlock @@gen_label10 DS 0H BALR 14,15 @@gen_label11 DS 0H * *** return r; LGR 15,3 * *** # 301 "C:\asgkafka\librdkafka\src\rdatomic.h" * *** __atomic_store_n(&ra->val, v, 6); * *** return v; * *** # 309 "C:\asgkafka\librdkafka\src\rdatomic.h" * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1067 DC F'184' @lit_1067_6 DC AD(pthread_mutex_lock) @lit_1067_7 DC AD(pthread_mutex_unlock) DROP 12 * * DSECT for automatic variables in "rd_atomic64_set" * (FUNCTION #1067) * @AUTO#rd_atomic64_set DSECT DS XL168 rd_atomic64_set#r#0 DS 8XL1 ; r * @CODE CSECT * * * * ....... start of rd_calloc @LNAME1077 DS 0H DC X'00000009' DC C'rd_calloc' DC X'00' rd_calloc DCCPRLG CINDEX=1077,BASER=12,FRAME=208,ENTRY=NO,ARCH=ZARCH,LN* AMEADDR=@LNAME1077 * ******* End of Prologue * * * *** void *p = calloc(num, sz); LG 15,0(0,1) ; num STG 15,176(0,13) LG 15,8(0,1) ; sz STG 15,184(0,13) LA 1,176(0,13) LG 15,@lit_1077_9 ; calloc @@gen_label12 DS 0H BALR 14,15 @@gen_label13 DS 0H LGR 2,15 * *** ((p) ? (void)0 : __assert(__func__, "C:\\asgkafka\\librdkaf\ * ka\\src\\rd.h", 122, "p")); LTGR 15,2 BNZ @L32 @L31 DS 0H LG 15,@lit_1077_10 STG 15,176(0,13) LG 15,@lit_1077_11 STG 15,184(0,13) MVGHI 192(13),122 LA 15,32(0,15) STG 15,200(0,13) LA 1,176(0,13) LG 15,@lit_1077_12 ; __assert @@gen_label15 DS 0H BALR 14,15 @@gen_label16 DS 0H @L32 DS 0H * *** return p; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1077 DC F'208' @lit_1077_9 DC AD(calloc) @lit_1077_12 DC AD(__assert) @lit_1077_11 DC AD(@strings@) @lit_1077_10 DC AD(@DATA) DROP 12 * * DSECT for automatic variables in "rd_calloc" * (FUNCTION #1077) * @AUTO#rd_calloc DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_malloc @LNAME1078 DS 0H DC X'00000009' DC C'rd_malloc' DC X'00' rd_malloc DCCPRLG CINDEX=1078,BASER=12,FRAME=208,ENTRY=NO,ARCH=ZARCH,LN* AMEADDR=@LNAME1078 * ******* End of Prologue * * * *** void *p = malloc(sz); LG 15,0(0,1) ; sz STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1078_14 ; malloc @@gen_label17 DS 0H BALR 14,15 @@gen_label18 DS 0H LGR 2,15 * *** ((p) ? (void)0 : __assert(__func__, "C:\\asgkafka\\librdkaf\ * ka\\src\\rd.h", 128, "p")); LTGR 15,2 BNZ @L34 @L33 DS 0H LG 15,@lit_1078_15 LA 15,10(0,15) STG 15,176(0,13) LG 15,@lit_1078_16 STG 15,184(0,13) MVGHI 192(13),128 LA 15,32(0,15) STG 15,200(0,13) LA 1,176(0,13) LG 15,@lit_1078_17 ; __assert @@gen_label20 DS 0H BALR 14,15 @@gen_label21 DS 0H @L34 DS 0H * *** return p; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1078 DC F'208' @lit_1078_14 DC AD(malloc) @lit_1078_17 DC AD(__assert) @lit_1078_16 DC AD(@strings@) @lit_1078_15 DC AD(@DATA) DROP 12 * * DSECT for automatic variables in "rd_malloc" * (FUNCTION #1078) * @AUTO#rd_malloc DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_free @LNAME1080 DS 0H DC X'00000007' DC C'rd_free' DC X'00' rd_free DCCPRLG CINDEX=1080,BASER=12,FRAME=176,ENTRY=NO,ARCH=ZARCH,LNA* MEADDR=@LNAME1080 * ******* End of Prologue * * * *** free(ptr); LG 15,0(0,1) ; ptr STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_1080_19 ; free @@gen_label22 DS 0H BALR 14,15 @@gen_label23 DS 0H * *** } @ret_lab_1080 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1080 DC F'176' @lit_1080_19 DC AD(free) DROP 12 * * DSECT for automatic variables in "rd_free" * (FUNCTION #1080) * @AUTO#rd_free DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_refcnt_sub0 @LNAME1084 DS 0H DC X'0000000E' DC C'rd_refcnt_sub0' DC X'00' rd_refcnt_sub0 DCCPRLG CINDEX=1084,BASER=12,FRAME=208,ENTRY=NO,ARCH=ZAR* CH,LNAMEADDR=@LNAME1084 * ******* End of Prologue * * * *** int r; * *** # 332 "C:\asgkafka\librdkafka\src\rd.h" * *** r = rd_atomic32_sub(R, 1); LG 15,0(0,1) ; R STG 15,176(0,13) MVGHI 184(13),1 LA 1,176(0,13) LG 15,@lit_1084_21 ; rd_atomic32_sub @@gen_label24 DS 0H BALR 14,15 @@gen_label25 DS 0H LTR 2,15 * *** * *** if (r < 0) BNL @L41 * *** ((!*"refcnt sub-zero") ? (void)0 : __assert(__\ * func__, "C:\\asgkafka\\librdkafka\\src\\rd.h", 335, "!*\"refcnt sub-\ * zero\"")); LG 15,@lit_1084_22 LA 1,34(0,15) CLI 0(1),0 BE @L41 @L42 DS 0H LG 1,@lit_1084_23 LA 1,54(0,1) STG 1,176(0,13) STG 15,184(0,13) MVGHI 192(13),335 LA 15,50(0,15) STG 15,200(0,13) LA 1,176(0,13) LG 15,@lit_1084_24 ; __assert @@gen_label28 DS 0H BALR 14,15 @@gen_label29 DS 0H @L43 DS 0H @L41 DS 0H * *** return r; LGFR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1084 DC F'208' @lit_1084_21 DC AD(rd_atomic32_sub) @lit_1084_22 DC AD(@strings@) @lit_1084_24 DC AD(__assert) @lit_1084_23 DC AD(@DATA) DROP 12 * * DSECT for automatic variables in "rd_refcnt_sub0" * (FUNCTION #1084) * @AUTO#rd_refcnt_sub0 DSECT DS XL168 rd_refcnt_sub0#r#0 DS 1F ; r * @CODE CSECT * * * * ....... start of rd_clock @LNAME1088 DS 0H DC X'00000008' DC C'rd_clock' DC X'00' rd_clock DCCPRLG CINDEX=1088,BASER=12,FRAME=200,ENTRY=NO,ARCH=ZARCH,LNA* MEADDR=@LNAME1088 * ******* End of Prologue * * * *** # 97 "C:\asgkafka\librdkafka\src\rdtime.h" * *** struct timeval tv; * *** gettimeofday(&tv, ((void *)0)); LA 15,168(0,13) STG 15,184(0,13) XC 192(8,13),192(13) LA 1,184(0,13) LG 15,@lit_1088_26 ; gettimeofday @@gen_label30 DS 0H BALR 14,15 @@gen_label31 DS 0H * *** return ((rd_ts_t)tv.tv_sec * 1000000LLU) + (rd_ts_t)tv.tv_\ * usec; LG 15,168(0,13) MSGFI 15,X'000F4240' LG 1,176(0,13) ; offset of tv_usec in timeval ALGR 15,1 * *** # 118 "C:\asgkafka\librdkafka\src\rdtime.h" * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1088 DC F'200' @lit_1088_26 DC AD(gettimeofday) DROP 12 * * DSECT for automatic variables in "rd_clock" * (FUNCTION #1088) * @AUTO#rd_clock DSECT DS XL168 rd_clock#tv#0 DS 16XL1 ; tv * @CODE CSECT * * * * ....... start of rd_timeout_us @LNAME1091 DS 0H DC X'0000000D' DC C'rd_timeout_us' DC X'00' rd_timeout_us DCCPRLG CINDEX=1091,BASER=12,FRAME=168,SAVEAREA=NO,ENTRY=* NO,ARCH=ZARCH,LNAMEADDR=@LNAME1091 * ******* End of Prologue * * * *** if (timeout_ms <= 0) LT 15,4(0,1) ; timeout_ms BH @L44 * *** return (rd_ts_t)timeout_ms; LGFR 15,15 B @ret_lab_1091 * *** else @L44 DS 0H * *** return (rd_ts_t)timeout_ms * 1000; LGFR 15,15 MGHI 15,1000 * *** } @ret_lab_1091 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_timeout_us" * (FUNCTION #1091) * @AUTO#rd_timeout_us DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_timeout_init_timespec_us @LNAME1094 DS 0H DC X'0000001B' DC C'rd_timeout_init_timespec_us' DC X'00' rd_timeout_init_timespec_us DCCPRLG CINDEX=1094,BASER=12,FRAME=184,ENTR* Y=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1094 * ******* End of Prologue * * * *** if (timeout_us == -1 || LMG 2,3,0(1) ; tspec CGHI 3,-1 BE @L51 * *** timeout_us == 0) { LTGR 15,3 BNE @L50 @L51 DS 0H * *** tspec->tv_sec = timeout_us; STG 3,0(0,2) ; tspec * *** tspec->tv_nsec = 0; MVGHI 8(2),0 ; offset of tv_nsec in timespec * *** } else { B @ret_lab_1094 DS 0D @FRAMESIZE_1094 DC F'184' @lit_1094_28 DC AD(_tthread_timespec_get) @lit_1094_30 DC FD'1000000' 0x00000000000f4240 @lit_1094_29 DC F'1000000' 0x000f4240 @L50 DS 0H * *** # 216 "C:\asgkafka\librdkafka\src\rdtime.h" * *** _tthread_timespec_get(tspec, 1); STG 2,168(0,13) MVGHI 176(13),1 LA 1,168(0,13) LG 15,@lit_1094_28 ; _tthread_timespec_get @@gen_label35 DS 0H BALR 14,15 @@gen_label36 DS 0H * *** * *** tspec->tv_sec += timeout_us / 1000000; LGR 5,3 DSGF 4,@lit_1094_29 AG 5,0(0,2) STG 5,0(0,2) * *** tspec->tv_nsec += (timeout_us % 1000000) * 100\ * 0; LGR 5,3 DSG 4,@lit_1094_30 MGHI 4,1000 AG 4,8(0,2) STG 4,8(0,2) * *** if (tspec->tv_nsec >= 1000000000) { LGR 15,4 CGFI 15,X'3B9ACA00' BL @ret_lab_1094 * *** tspec->tv_nsec -= 1000000000; LG 15,8(0,2) SLGFI 15,X'3B9ACA00' STG 15,8(0,2) * *** tspec->tv_sec++; LG 15,0(0,2) AGHI 15,1 STG 15,0(0,2) * *** } @L53 DS 0H * *** } @L52 DS 0H * *** } @ret_lab_1094 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_timeout_init_timespec_us" * (FUNCTION #1094) * @AUTO#rd_timeout_init_timespec_us DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_timeout_init_timespec @LNAME1095 DS 0H DC X'00000018' DC C'rd_timeout_init_timespec' DC X'00' rd_timeout_init_timespec DCCPRLG CINDEX=1095,BASER=12,FRAME=184,ENTRY=N* O,ARCH=ZARCH,LNAMEADDR=@LNAME1095 * ******* End of Prologue * * * *** if (timeout_ms == -1 || LG 2,0(0,1) ; tspec L 3,12(0,1) ; timeout_ms CHI 3,-1 BE @L55 * *** timeout_ms == 0) { LTR 3,3 BNE @L54 @L55 DS 0H * *** tspec->tv_sec = timeout_ms; LGFR 15,3 STG 15,0(0,2) ; tspec * *** tspec->tv_nsec = 0; MVGHI 8(2),0 ; offset of tv_nsec in timespec * *** } else { B @ret_lab_1095 DS 0D @FRAMESIZE_1095 DC F'184' @lit_1095_32 DC AD(_tthread_timespec_get) @lit_1095_35 DC F'1000' 0x000003e8 @lit_1095_34 DC F'274877907' 0x10624dd3 @L54 DS 0H * *** # 247 "C:\asgkafka\librdkafka\src\rdtime.h" * *** _tthread_timespec_get(tspec, 1); STG 2,168(0,13) MVGHI 176(13),1 LA 1,168(0,13) LG 15,@lit_1095_32 ; _tthread_timespec_get @@gen_label40 DS 0H BALR 14,15 @@gen_label41 DS 0H * *** * *** tspec->tv_sec += timeout_ms / 1000; LG 15,0(0,2) LR 1,3 ; /0x3e8 LR 5,3 ; . SRL 1,31(0) ; . M 4,@lit_1095_34 ; . SRA 4,6(0) ; . ALR 4,1 ; . AGFR 15,4 STG 15,0(0,2) * *** tspec->tv_nsec += (timeout_ms % 1000) * 100000\ * 0; LG 15,8(0,2) LR 1,3 SRL 1,31(0) LR 5,3 M 4,@lit_1095_34 SRA 4,6(0) ALR 4,1 LR 5,4 M 4,@lit_1095_35 SR 3,5 MSFI 3,X'000F4240' AGFR 15,3 STG 15,8(0,2) * *** if (tspec->tv_nsec >= 1000000000) { CGFI 15,X'3B9ACA00' BL @ret_lab_1095 * *** tspec->tv_nsec -= 1000000000; LG 15,8(0,2) SLGFI 15,X'3B9ACA00' STG 15,8(0,2) * *** tspec->tv_sec++; LG 15,0(0,2) AGHI 15,1 STG 15,0(0,2) * *** } @L57 DS 0H * *** } @L56 DS 0H * *** } @ret_lab_1095 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_timeout_init_timespec" * (FUNCTION #1095) * @AUTO#rd_timeout_init_timespec DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_keep @LNAME1428 DS 0H DC X'0000000F' DC C'rd_kafka_q_keep' DC X'00' rd_kafka_q_keep DCCPRLG CINDEX=1428,BASER=12,FRAME=176,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1428 * ******* End of Prologue * * * *** mtx_lock(&rkq->rkq_lock); LG 2,0(0,1) ; rkq STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1428_37 ; mtx_lock @@gen_label43 DS 0H BALR 14,15 @@gen_label44 DS 0H * *** rkq->rkq_refcnt++; L 15,128(0,2) AHI 15,1 ST 15,128(0,2) * *** mtx_unlock(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1428_38 ; mtx_unlock @@gen_label45 DS 0H BALR 14,15 @@gen_label46 DS 0H * *** return rkq; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1428 DC F'176' @lit_1428_37 DC AD(mtx_lock) @lit_1428_38 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_keep" * (FUNCTION #1428) * @AUTO#rd_kafka_q_keep DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_disable0 @LNAME1432 DS 0H DC X'00000013' DC C'rd_kafka_q_disable0' DC X'00' rd_kafka_q_disable0 DCCPRLG CINDEX=1432,BASER=12,FRAME=176,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1432 * ******* End of Prologue * * * *** if (do_lock) LG 2,0(0,1) ; rkq LT 3,12(0,1) ; do_lock BZ @L256 * *** mtx_lock(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1432_40 ; mtx_lock @@gen_label48 DS 0H BALR 14,15 @@gen_label49 DS 0H @L256 DS 0H * *** rkq->rkq_flags &= ~0x2; L 15,132(0,2) NILL 15,65533 ST 15,132(0,2) * *** if (do_lock) LTR 3,3 BZ @ret_lab_1432 * *** mtx_unlock(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1432_41 ; mtx_unlock @@gen_label51 DS 0H BALR 14,15 @@gen_label52 DS 0H @L257 DS 0H * *** } @ret_lab_1432 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1432 DC F'176' @lit_1432_40 DC AD(mtx_lock) @lit_1432_41 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_disable0" * (FUNCTION #1432) * @AUTO#rd_kafka_q_disable0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_destroy0 @LNAME1435 DS 0H DC X'00000013' DC C'rd_kafka_q_destroy0' DC X'00' rd_kafka_q_destroy0 DCCPRLG CINDEX=1435,BASER=12,FRAME=216,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1435 * ******* End of Prologue * * * *** int do_delete = 0; LG 2,0(0,1) ; rkq * *** * *** if (disable) { LT 15,12(0,1) ; disable BZ @L258 * *** * *** * *** * *** * *** rd_kafka_q_disable0(rkq, 1); STG 2,176(0,13) MVGHI 184(13),1 LA 1,176(0,13) LG 15,@lit_1435_44 ; rd_kafka_q_disable0 @@gen_label54 DS 0H BALR 14,15 @@gen_label55 DS 0H * *** rd_kafka_q_purge0(rkq, 1); STG 2,176(0,13) MVGHI 184(13),1 LA 1,176(0,13) LG 15,@lit_1435_45 ; rd_kafka_q_purge0 @@gen_label56 DS 0H BALR 14,15 @@gen_label57 DS 0H * *** } @L258 DS 0H * *** * *** mtx_lock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1435_46 ; mtx_lock @@gen_label58 DS 0H BALR 14,15 @@gen_label59 DS 0H * *** do { if (((!(rkq->rkq_refcnt > 0)))) rd_kafka_crash("C\ * :\\asgkafka\\librdkafka\\src\\rdkafka_queue.h",211, __FUNCTION__, ((\ * (void *)0)), "assert: " "rkq->rkq_refcnt > 0"); } while (0); @L259 DS 0H CHSI 128(2),0 BH @L262 LG 15,@lit_1435_47 LA 1,70(0,15) STG 1,176(0,13) MVGHI 184(13),211 LG 1,@lit_1435_48 LA 1,114(0,1) STG 1,192(0,13) XC 200(8,13),200(13) LA 15,114(0,15) STG 15,208(0,13) LA 1,176(0,13) LG 15,@lit_1435_49 ; rd_kafka_crash @@gen_label61 DS 0H BALR 14,15 @@gen_label62 DS 0H @L262 DS 0H * *** do_delete = !--rkq->rkq_refcnt; L 15,128(0,2) AHI 15,-1 ST 15,128(0,2) LPR 3,15 AHI 3,-1 SRL 3,31(0) * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1435_50 ; mtx_unlock @@gen_label63 DS 0H BALR 14,15 @@gen_label64 DS 0H * *** * *** if (((do_delete))) LTR 3,3 BZ @L263 * *** rd_kafka_q_destroy_final(rkq); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1435_51 ; rd_kafka_q_destroy_final @@gen_label66 DS 0H BALR 14,15 @@gen_label67 DS 0H @L263 DS 0H * *** } @ret_lab_1435 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1435 DC F'216' @lit_1435_44 DC AD(rd_kafka_q_disable0) @lit_1435_45 DC AD(rd_kafka_q_purge0) @lit_1435_46 DC AD(mtx_lock) @lit_1435_49 DC AD(rd_kafka_crash) @lit_1435_48 DC AD(@DATA) @lit_1435_47 DC AD(@strings@) @lit_1435_50 DC AD(mtx_unlock) @lit_1435_51 DC AD(rd_kafka_q_destroy_final) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_destroy0" * (FUNCTION #1435) * @AUTO#rd_kafka_q_destroy0 DSECT DS XL168 rd_kafka_q_destroy0#do_delete#0 DS 1F ; do_delete * @CODE CSECT * * * * ....... start of rd_kafka_q_destroy_owner @LNAME1436 DS 0H DC X'00000018' DC C'rd_kafka_q_destroy_owner' DC X'00' rd_kafka_q_destroy_owner DCCPRLG CINDEX=1436,BASER=12,FRAME=184,ENTRY=N* O,ARCH=ZARCH,LNAMEADDR=@LNAME1436 * ******* End of Prologue * * * *** rd_kafka_q_destroy0(rkq, 1); LG 15,0(0,1) ; rkq STG 15,168(0,13) MVGHI 176(13),1 LA 1,168(0,13) LG 15,@lit_1436_53 ; rd_kafka_q_destroy0 @@gen_label68 DS 0H BALR 14,15 @@gen_label69 DS 0H * *** } @ret_lab_1436 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1436 DC F'184' @lit_1436_53 DC AD(rd_kafka_q_destroy0) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_destroy_owner" * (FUNCTION #1436) * @AUTO#rd_kafka_q_destroy_owner DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_reset @LNAME1437 DS 0H DC X'00000010' DC C'rd_kafka_q_reset' DC X'00' rd_kafka_q_reset DCCPRLG CINDEX=1437,BASER=0,FRAME=168,SAVEAREA=NO,ENTR* Y=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1437 * ******* End of Prologue * * * *** do { (&rkq->rkq_q)->tqh_first = (((void *)0)); (&rkq->rkq_q\ * )->tqh_last = &(&rkq->rkq_q)->tqh_first; } while ( 0); LG 15,0(0,1) ; rkq @L264 DS 0H LGHI 1,0 ; 0 STG 1,96(0,15) ; offset of rkq_q in rd_kafka_q_s LA 1,96(0,15) STG 1,104(0,15) ; offset of tqh_last in rd_kafka_op_tailq * *** do {} while (0); @L267 DS 0H * *** rkq->rkq_qlen = 0; MVHI 112(15),0 ; offset of rkq_qlen in rd_kafka_q_s * *** rkq->rkq_qsize = 0; MVGHI 120(15),0 ; offset of rkq_qsize in rd_kafka_q_s * *** } @ret_lab_1437 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue * * DSECT for automatic variables in "rd_kafka_q_reset" * (FUNCTION #1437) * @AUTO#rd_kafka_q_reset DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_fwd_get @LNAME1439 DS 0H DC X'00000012' DC C'rd_kafka_q_fwd_get' DC X'00' rd_kafka_q_fwd_get DCCPRLG CINDEX=1439,BASER=12,FRAME=184,ENTRY=NO,ARCH* =ZARCH,LNAMEADDR=@LNAME1439 * ******* End of Prologue * * LG 2,0(0,1) ; rkq * *** rd_kafka_q_t *fwdq; * *** if (do_lock) LT 4,12(0,1) ; do_lock BZ @L270 * *** mtx_lock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1439_56 ; mtx_lock @@gen_label71 DS 0H BALR 14,15 @@gen_label72 DS 0H @L270 DS 0H * *** * *** if ((fwdq = rkq->rkq_fwdq)) LG 3,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s LTGR 15,3 BZ @L271 * *** rd_kafka_q_keep(fwdq); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1439_57 ; rd_kafka_q_keep @@gen_label74 DS 0H BALR 14,15 @@gen_label75 DS 0H @L271 DS 0H * *** * *** if (do_lock) LTR 4,4 BZ @L272 * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1439_58 ; mtx_unlock @@gen_label77 DS 0H BALR 14,15 @@gen_label78 DS 0H @L272 DS 0H * *** * *** return fwdq; LGR 15,3 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1439 DC F'184' @lit_1439_56 DC AD(mtx_lock) @lit_1439_57 DC AD(rd_kafka_q_keep) @lit_1439_58 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_fwd_get" * (FUNCTION #1439) * @AUTO#rd_kafka_q_fwd_get DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_io_event @LNAME1441 DS 0H DC X'00000013' DC C'rd_kafka_q_io_event' DC X'00' rd_kafka_q_io_event DCCPRLG CINDEX=1441,BASER=12,FRAME=192,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1441 * ******* End of Prologue * * LG 15,0(0,1) ; rkq * *** * *** if (((!rkq->rkq_qio))) LTG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s BZ @ret_lab_1441 * *** return; @L275 DS 0H * *** * *** if (rkq->rkq_qio->event_cb) { LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LTG 1,32(0,1) ; offset of event_cb in rd_kafka_q_io BZ @L276 * *** rkq->rkq_qio->event_cb(rkq->rkq_rk, * *** rkq->rkq_qio->event_cb_\ * opaque); LG 1,136(0,15) STG 1,168(0,13) LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LG 1,40(0,1) STG 1,176(0,13) LG 15,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LG 15,32(0,15) ; offset of event_cb in rd_kafka_q_io LA 1,168(0,13) @@gen_label81 DS 0H BALR 14,15 @@gen_label82 DS 0H * *** return; B @ret_lab_1441 DS 0D @FRAMESIZE_1441 DC F'192' @lit_1441_60 DC AD(write) * *** } @L276 DS 0H * *** * *** * *** * *** * *** * *** * *** if (rkq->rkq_qio->sent) LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s CLI 24(1),0 BNE @ret_lab_1441 * *** return; @L277 DS 0H * *** * *** rkq->rkq_qio->sent = 1; LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s MVI 24(1),1 ; offset of sent in rd_kafka_q_io * *** * *** * *** * *** if (write(rkq->rkq_qio->fd,rkq->rkq_qio->payload,(int)\ * rkq->rkq_qio->size) == -1) LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LGF 1,0(0,1) STG 1,168(0,13) LG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LG 1,8(0,1) STG 1,176(0,13) LG 15,144(0,15) ; offset of rkq_qio in rd_kafka_q_s LGF 15,20(0,15) STG 15,184(0,13) LA 1,168(0,13) LG 15,@lit_1441_60 ; write @@gen_label84 DS 0H BALR 14,15 @@gen_label85 DS 0H * *** * *** ; @L278 DS 0H * *** } @ret_lab_1441 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_io_event" * (FUNCTION #1441) * @AUTO#rd_kafka_q_io_event DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_op_cmp_prio @LNAME1442 DS 0H DC X'00000014' DC C'rd_kafka_op_cmp_prio' DC X'00' rd_kafka_op_cmp_prio DCCPRLG CINDEX=1442,BASER=12,FRAME=176,SAVEAREA=NO* ,ENTRY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1442 * ******* End of Prologue * * * *** const rd_kafka_op_t *a = _a, *b = _b; LG 15,0(0,1) ; _a LG 1,8(0,1) ; _b * *** * *** return (int)((b->rko_prio) < (a->rko_prio) ? -1 : ((b-\ * >rko_prio) > (a->rko_prio))); L 2,52(0,1) ; offset of rko_prio in rd_kafka_op_s C 2,52(0,15) BNL @L279 LHI 15,-1 ; -1 B @L280 @L279 DS 0H L 1,52(0,1) ; offset of rko_prio in rd_kafka_op_s C 1,52(0,15) BNH @@gen_label87 LHI 15,1 B @@gen_label88 @@gen_label87 DS 0H LHI 15,0 @@gen_label88 DS 0H @L280 DS 0H LGFR 15,15 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_op_cmp_prio" * (FUNCTION #1442) * @AUTO#rd_kafka_op_cmp_prio DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_yield @LNAME1443 DS 0H DC X'00000010' DC C'rd_kafka_q_yield' DC X'00' rd_kafka_q_yield DCCPRLG CINDEX=1443,BASER=12,FRAME=192,ENTRY=NO,ARCH=Z* ARCH,LNAMEADDR=@LNAME1443 * ******* End of Prologue * * LG 2,0(0,1) ; rkq * *** rd_kafka_q_t *fwdq; * *** * *** mtx_lock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_63 ; mtx_lock @@gen_label89 DS 0H BALR 14,15 @@gen_label90 DS 0H * *** * *** do {} while (0); @L281 DS 0H * *** * *** if (((!(rkq->rkq_flags & 0x2)))) { TM 135(2),2 BNZ @L284 * *** * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_64 ; mtx_unlock @@gen_label92 DS 0H BALR 14,15 @@gen_label93 DS 0H * *** return; B @ret_lab_1443 DS 0D @FRAMESIZE_1443 DC F'192' @lit_1443_63 DC AD(mtx_lock) @lit_1443_64 DC AD(mtx_unlock) @lit_1443_65 DC AD(rd_kafka_q_fwd_get) @lit_1443_66 DC AD(cnd_broadcast) @lit_1443_67 DC AD(rd_kafka_q_io_event) @lit_1443_70 DC AD(rd_kafka_q_yield) @lit_1443_71 DC AD(rd_kafka_q_destroy0) * *** } @L284 DS 0H * *** * *** if (!(fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 2,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1443_65 ; rd_kafka_q_fwd_get @@gen_label94 DS 0H BALR 14,15 @@gen_label95 DS 0H LGR 3,15 LTGR 15,3 BNZ @L285 * *** rkq->rkq_flags |= 0x8; L 15,132(0,2) OILL 15,8 ST 15,132(0,2) * *** cnd_broadcast(&rkq->rkq_cond); LA 15,40(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_66 ; cnd_broadcast @@gen_label97 DS 0H BALR 14,15 @@gen_label98 DS 0H * *** if (rkq->rkq_qlen == 0) CHSI 112(2),0 BNE @L286 * *** rd_kafka_q_io_event(rkq); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_67 ; rd_kafka_q_io_event @@gen_label100 DS 0H BALR 14,15 @@gen_label101 DS 0H @L286 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_64 ; mtx_unlock @@gen_label102 DS 0H BALR 14,15 @@gen_label103 DS 0H * *** } else { B @L287 @L285 DS 0H * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_64 ; mtx_unlock @@gen_label104 DS 0H BALR 14,15 @@gen_label105 DS 0H * *** rd_kafka_q_yield(fwdq); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1443_70 ; rd_kafka_q_yield @@gen_label106 DS 0H BALR 14,15 @@gen_label107 DS 0H * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 3,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1443_71 ; rd_kafka_q_destroy0 @@gen_label108 DS 0H BALR 14,15 @@gen_label109 DS 0H * *** } @L287 DS 0H * *** * *** * *** } @ret_lab_1443 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_yield" * (FUNCTION #1443) * @AUTO#rd_kafka_q_yield DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_enq0 @LNAME1444 DS 0H DC X'0000000F' DC C'rd_kafka_q_enq0' DC X'00' rd_kafka_q_enq0 DCCPRLG CINDEX=1444,BASER=12,FRAME=192,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1444 * ******* End of Prologue * * * *** if (((!rko->rko_prio))) LMG 3,4,0(1) ; rkq LT 15,52(0,4) ; offset of rko_prio in rd_kafka_op_s BNZ @L288 * *** do { (rko)->rko_link .tqe_next = (((void *)0)); (rko)\ * ->rko_link .tqe_prev = (&rkq->rkq_q)->tqh_last; *(&rkq->rkq_q)->tqh_\ * last = (rko); (&rkq->rkq_q)->tqh_last = &(rko)->rko_link .tqe_next; \ * } while ( 0); @L289 DS 0H LGHI 15,0 ; 0 STG 15,0(0,4) ; rko LG 15,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq STG 15,8(0,4) ; offset of tqe_prev in 0000055 LG 15,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq STG 4,0(0,15) STG 4,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq * *** else if (at_head) B @L292 DS 0D @FRAMESIZE_1444 DC F'192' @lit_1444_74 DC AD(rd_kafka_op_cmp_prio) @L288 DS 0H LT 15,20(0,1) ; at_head BZ @L300 * *** do { if (((rko)->rko_link .tqe_next = (&rkq->rkq_\ * q)->tqh_first) != (((void *)0))) (&rkq->rkq_q)->tqh_first->rko_link \ * .tqe_prev = &(rko)->rko_link .tqe_next; else (&rkq->rkq_q)->tqh_last\ * = &(rko)->rko_link .tqe_next; (&rkq->rkq_q)->tqh_first = (rko); (rk\ * o)->rko_link .tqe_prev = &(&rkq->rkq_q)->tqh_first; } while ( 0); @L294 DS 0H LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s STG 15,0(0,4) LTGR 15,15 BE @L297 LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s STG 4,8(0,15) ; offset of tqe_prev in 0000055 B @L298 @L297 DS 0H STG 4,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq @L298 DS 0H STG 4,96(0,3) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,3) STG 15,8(0,4) ; offset of tqe_prev in 0000055 * *** else B @L292 * *** do { if(((&rkq->rkq_q)->tqh_first) == ((void *)0)) { d\ * o { if (((rko)->rko_link .tqe_next = (&rkq->rkq_q)->tqh_first) != (\ * ((void *)0))) (&rkq->rkq_q)->tqh_first->rko_link .tqe_prev = &(rko)-\ * >rko_link .tqe_next; else (&rkq->rkq_q)->tqh_last = &(rko)->rko_link\ * .tqe_next; (&rkq->rkq_q)->tqh_first = (rko); (rko)->rko_link .tqe_p\ * rev = &(&rkq->rkq_q)->tqh_first; } while ( 0); } else { rd_kafka_op_\ * t * _tmp; for ((_tmp) = ((&rkq->rkq_q)->tqh_first); (_tmp) != (((voi\ * d *)0)); (_tmp) = ((_tmp)->rko_link .tqe_next)) { if(rd_kafka_op_cmp\ * _prio(rko,_tmp) < 0) { do { (rko)->rko_link .tqe_prev = (_tmp)->rko\ * _link .tqe_prev; (rko)->rko_link .tqe_next = (_tmp); *(_tmp)->rko_li\ * nk .tqe_prev = (rko); (_tmp)->rko_link .tqe_prev = &(rko)->rko_link \ * .tqe_next; } while ( 0); break; } if(!((_tmp)->rko_link .tqe_next)) \ * { do { if (((rko)->rko_link .tqe_next = (_tmp)->rko_link .tqe_next)\ * != (((void *)0))) (rko)->rko_link .tqe_next->rko_link .tqe_prev = &\ * (rko)->rko_link .tqe_next; else (&rkq->rkq_q)->tqh_last = &(rko)->rk\ * o_link .tqe_next; (_tmp)->rko_link .tqe_next = (rko); (rko)->rko_lin\ * k .tqe_prev = &(_tmp)->rko_link .tqe_next; } while ( 0); break; } } \ * } } while(0); @L300 DS 0H LTG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s BNE @L303 @L304 DS 0H LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s STG 15,0(0,4) LTGR 15,15 BE @L307 LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s STG 4,8(0,15) ; offset of tqe_prev in 0000055 B @L308 @L307 DS 0H STG 4,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq @L308 DS 0H STG 4,96(0,3) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,3) STG 15,8(0,4) ; offset of tqe_prev in 0000055 B @L309 @L303 DS 0H LG 2,96(0,3) ; offset of rkq_q in rd_kafka_q_s B @L311 @L310 DS 0H STG 4,176(0,13) STG 2,184(0,13) LA 1,176(0,13) LG 15,@lit_1444_74 ; rd_kafka_op_cmp_prio @@gen_label115 DS 0H BALR 14,15 @@gen_label116 DS 0H LTR 15,15 BNL @L314 @L315 DS 0H LG 15,8(0,2) ; offset of tqe_prev in 0000055 STG 15,8(0,4) ; offset of tqe_prev in 0000055 STG 2,0(0,4) ; rko LG 15,8(0,2) ; offset of tqe_prev in 0000055 STG 4,0(0,15) STG 4,8(0,2) ; offset of tqe_prev in 0000055 B @L312 @L314 DS 0H LTG 15,0(0,2) ; _tmp BNZ @L318 @L319 DS 0H LG 15,0(0,2) ; _tmp STG 15,0(0,4) LTGR 15,15 BE @L322 LG 15,0(0,4) ; rko STG 4,8(0,15) ; offset of tqe_prev in 0000055 B @L323 @L322 DS 0H STG 4,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq @L323 DS 0H STG 4,0(0,2) ; _tmp STG 2,8(0,4) ; offset of tqe_prev in 0000055 B @L312 @L318 DS 0H LG 2,0(0,2) ; _tmp @L311 DS 0H LTGR 15,2 BNE @L310 @L312 DS 0H @L309 DS 0H * *** * *** rkq->rkq_qlen++; @L299 DS 0H @L292 DS 0H L 15,112(0,3) AHI 15,1 ST 15,112(0,3) * *** rkq->rkq_qsize += rko->rko_len; LG 15,120(0,3) AGF 15,48(0,4) STG 15,120(0,3) * *** } @ret_lab_1444 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_enq0" * (FUNCTION #1444) * @AUTO#rd_kafka_q_enq0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_enq1 @LNAME1445 DS 0H DC X'0000000F' DC C'rd_kafka_q_enq1' DC X'00' rd_kafka_q_enq1 DCCPRLG CINDEX=1445,BASER=12,FRAME=216,ENTRY=NO,ARCH=ZA* RCH,LNAMEADDR=@LNAME1445 LGR 7,1 ; ptr to parm area * ******* End of Prologue * * LMG 2,4,0(7) ; rkq LT 5,36(0,7) ; do_lock * *** rd_kafka_q_t *fwdq; * *** * *** if (do_lock) BZ @L325 * *** mtx_lock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_76 ; mtx_lock @@gen_label122 DS 0H BALR 14,15 @@gen_label123 DS 0H @L324 DS 0H * *** * *** do {} while (0); @L325 DS 0H * *** * *** if (((!(rkq->rkq_flags & 0x2)))) { TM 135(2),2 BNZ @L328 * *** * *** if (do_lock) LTR 5,5 BZ @L329 * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_77 ; mtx_unlock @@gen_label126 DS 0H BALR 14,15 @@gen_label127 DS 0H @L329 DS 0H * *** * *** return rd_kafka_op_reply(rko, RD_KAFKA_RESP_ER\ * R__DESTROY); STG 3,176(0,13) MVGHI 184(13),-197 LA 1,176(0,13) LG 15,@lit_1445_78 ; rd_kafka_op_reply @@gen_label128 DS 0H BALR 14,15 @@gen_label129 DS 0H LGFR 15,15 B @ret_lab_1445 DS 0D @FRAMESIZE_1445 DC F'216' @lit_1445_76 DC AD(mtx_lock) @lit_1445_77 DC AD(mtx_unlock) @lit_1445_78 DC AD(rd_kafka_op_reply) @lit_1445_79 DC AD(rd_kafka_q_fwd_get) @lit_1445_80 DC AD(rd_kafka_q_enq0) @lit_1445_81 DC AD(cnd_signal) @lit_1445_82 DC AD(rd_kafka_q_io_event) @lit_1445_85 DC AD(rd_kafka_q_enq1) @lit_1445_86 DC AD(rd_kafka_q_destroy0) * *** } @L328 DS 0H * *** * *** if (!(fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 2,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1445_79 ; rd_kafka_q_fwd_get @@gen_label130 DS 0H BALR 14,15 @@gen_label131 DS 0H LGR 6,15 LTGR 15,6 BNZ @L330 * *** if (!rko->rko_serve && orig_destq->rkq_serve) \ * { LTG 15,80(0,3) ; offset of rko_serve in rd_kafka_op_s BNZ @L331 LTG 15,152(0,4) ; offset of rkq_serve in rd_kafka_q_s BZ @L331 * *** * *** * *** rko->rko_serve = orig_destq->rkq_serve\ * ; LG 15,152(0,4) ; offset of rkq_serve in rd_kafka_q_s STG 15,80(0,3) ; offset of rko_serve in rd_kafka_op_s * *** rko->rko_serve_opaque = orig_destq->rk\ * q_opaque; LG 15,160(0,4) ; offset of rkq_opaque in rd_kafka_q_s STG 15,88(0,3) ; offset of rko_serve_opaque in rd_kafka_op_* s * *** } @L331 DS 0H * *** * *** rd_kafka_q_enq0(rkq, rko, at_head); STMG 2,3,176(13) LGF 15,28(0,7) ; at_head STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1445_80 ; rd_kafka_q_enq0 @@gen_label135 DS 0H BALR 14,15 @@gen_label136 DS 0H * *** cnd_signal(&rkq->rkq_cond); LA 15,40(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_81 ; cnd_signal @@gen_label137 DS 0H BALR 14,15 @@gen_label138 DS 0H * *** if (rkq->rkq_qlen == 1) CHSI 112(2),1 BNE @L332 * *** rd_kafka_q_io_event(rkq); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_82 ; rd_kafka_q_io_event @@gen_label140 DS 0H BALR 14,15 @@gen_label141 DS 0H @L332 DS 0H * *** * *** if (do_lock) LTR 5,5 BZ @L334 * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_77 ; mtx_unlock @@gen_label143 DS 0H BALR 14,15 @@gen_label144 DS 0H @L333 DS 0H * *** } else { B @L334 @L330 DS 0H * *** if (do_lock) LTR 5,5 BZ @L335 * *** mtx_unlock(&rkq->rkq_lock); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1445_77 ; mtx_unlock @@gen_label146 DS 0H BALR 14,15 @@gen_label147 DS 0H @L335 DS 0H * *** rd_kafka_q_enq1(fwdq, rko, orig_destq, at_head\ * , 1); STG 6,176(0,13) STMG 3,4,184(13) LGF 15,28(0,7) ; at_head STG 15,200(0,13) MVGHI 208(13),1 LA 1,176(0,13) LG 15,@lit_1445_85 ; rd_kafka_q_enq1 @@gen_label148 DS 0H BALR 14,15 @@gen_label149 DS 0H * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 6,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1445_86 ; rd_kafka_q_destroy0 @@gen_label150 DS 0H BALR 14,15 @@gen_label151 DS 0H * *** } @L334 DS 0H * *** * *** return 1; LGHI 15,1 ; 1 * *** } @ret_lab_1445 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_enq1" * (FUNCTION #1445) * @AUTO#rd_kafka_q_enq1 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_enq @LNAME1446 DS 0H DC X'0000000E' DC C'rd_kafka_q_enq' DC X'00' rd_kafka_q_enq DCCPRLG CINDEX=1446,BASER=12,FRAME=208,ENTRY=NO,ARCH=ZAR* CH,LNAMEADDR=@LNAME1446 * ******* End of Prologue * * * *** return rd_kafka_q_enq1(rkq, rko, rkq, 0, 1); LG 15,0(0,1) ; rkq STG 15,168(0,13) LG 15,8(0,1) ; rko STG 15,176(0,13) LG 15,0(0,1) ; rkq STG 15,184(0,13) XC 192(8,13),192(13) MVGHI 200(13),1 LA 1,168(0,13) LG 15,@lit_1446_89 ; rd_kafka_q_enq1 @@gen_label152 DS 0H BALR 14,15 @@gen_label153 DS 0H LGFR 15,15 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1446 DC F'208' @lit_1446_89 DC AD(rd_kafka_q_enq1) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_enq" * (FUNCTION #1446) * @AUTO#rd_kafka_q_enq DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_deq0 @LNAME1448 DS 0H DC X'0000000F' DC C'rd_kafka_q_deq0' DC X'00' rd_kafka_q_deq0 DCCPRLG CINDEX=1448,BASER=12,FRAME=168,SAVEAREA=NO,ENTR* Y=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1448 * ******* End of Prologue * * * *** do {} while (0); LG 15,0(0,1) ; rkq LG 1,8(0,1) ; rko @L336 DS 0H * *** * *** * *** do { if (((rko)->rko_link .tqe_next) != (((void *)0)\ * )) (rko)->rko_link .tqe_next->rko_link .tqe_prev = (rko)->rko_link .\ * tqe_prev; else (&rkq->rkq_q)->tqh_last = (rko)->rko_link .tqe_prev; \ * *(rko)->rko_link .tqe_prev = (rko)->rko_link .tqe_next; ; } while ( \ * 0); @L339 DS 0H LTG 2,0(0,1) ; rko BE @L342 LMG 2,3,0(1) ; rko STG 3,8(0,2) ; offset of tqe_prev in 0000055 B @L343 @L342 DS 0H LG 2,8(0,1) ; offset of tqe_prev in 0000055 STG 2,104(0,15) ; offset of tqh_last in rd_kafka_op_tailq @L343 DS 0H LG 2,8(0,1) ; offset of tqe_prev in 0000055 LG 3,0(0,1) ; rko STG 3,0(0,2) * *** rkq->rkq_qlen--; L 2,112(0,15) AHI 2,-1 ST 2,112(0,15) * *** rkq->rkq_qsize -= rko->rko_len; LG 2,120(0,15) SGF 2,48(0,1) STG 2,120(0,15) * *** } @ret_lab_1448 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_deq0" * (FUNCTION #1448) * @AUTO#rd_kafka_q_deq0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_mark_served @LNAME1449 DS 0H DC X'00000016' DC C'rd_kafka_q_mark_served' DC X'00' rd_kafka_q_mark_served DCCPRLG CINDEX=1449,BASER=12,FRAME=168,SAVEAREA=* NO,ENTRY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1449 * ******* End of Prologue * * * *** if (rkq->rkq_qio) LG 15,0(0,1) ; rkq LTG 1,144(0,15) ; offset of rkq_qio in rd_kafka_q_s BZ @ret_lab_1449 * *** rkq->rkq_qio->sent = 0; LG 15,144(0,15) ; offset of rkq_qio in rd_kafka_q_s MVI 24(15),0 ; offset of sent in rd_kafka_q_io @L344 DS 0H * *** } @ret_lab_1449 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_mark_served" * (FUNCTION #1449) * @AUTO#rd_kafka_q_mark_served DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_concat0 @LNAME1450 DS 0H DC X'00000012' DC C'rd_kafka_q_concat0' DC X'00' rd_kafka_q_concat0 DCCPRLG CINDEX=1450,BASER=12,FRAME=200,ENTRY=NO,ARCH* =ZARCH,LNAMEADDR=@LNAME1450 * ******* End of Prologue * * * *** int r = 0; LG 5,0(0,1) ; rkq LG 2,8(0,1) ; srcq L 6,20(0,1) ; do_lock LHI 4,0 ; 0 * *** * *** while (srcq->rkq_fwdq) B @L348 DS 0D @FRAMESIZE_1450 DC F'200' @lit_1450_93 DC AD(mtx_lock) @lit_1450_94 DC AD(mtx_unlock) @lit_1450_96 DC AD(rd_kafka_op_cmp_prio) @lit_1450_98 DC AD(rd_kafka_q_io_event) @lit_1450_99 DC AD(cnd_signal) @lit_1450_100 DC AD(rd_kafka_q_mark_served) @lit_1450_101 DC AD(rd_kafka_q_reset) @lit_1450_103 DC AD(rd_kafka_q_concat0) @L347 DS 0H * *** srcq = srcq->rkq_fwdq; LG 2,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s @L348 DS 0H LTG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L347 * *** if (((srcq->rkq_qlen == 0))) CHSI 112(2),0 BNE @L349 * *** return 0; LGHI 15,0 ; 0 B @ret_lab_1450 @L349 DS 0H * *** * *** if (do_lock) LTR 6,6 BZ @L350 * *** mtx_lock(&rkq->rkq_lock); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_93 ; mtx_lock @@gen_label159 DS 0H BALR 14,15 @@gen_label160 DS 0H @L350 DS 0H * *** if (!rkq->rkq_fwdq) { LTG 15,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L351 * *** rd_kafka_op_t *rko; * *** * *** do {} while (0); @L352 DS 0H * *** * *** if (((!(rkq->rkq_flags & 0x2)))) { TM 135(5),2 BNZ @L360 * *** if (do_lock) LTR 6,6 BZ @L356 * *** mtx_unlock(&rkq->rkq_lock); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_94 ; mtx_unlock @@gen_label164 DS 0H BALR 14,15 @@gen_label165 DS 0H @L356 DS 0H * *** return -1; LGHI 15,-1 ; -1 B @ret_lab_1450 * *** } * *** * *** * *** while ((rko = ((&srcq->rkq_q)->tqh_first)) && \ * rko->rko_prio > 0) { * *** do { if (((rko)->rko_link .tqe_next)\ * != (((void *)0))) (rko)->rko_link .tqe_next->rko_link .tqe_prev = (\ * rko)->rko_link .tqe_prev; else (&srcq->rkq_q)->tqh_last = (rko)->rko\ * _link .tqe_prev; *(rko)->rko_link .tqe_prev = (rko)->rko_link .tqe_n\ * ext; ; } while ( 0); @L362 DS 0H LTG 15,0(0,7) ; rko BE @L365 LG 15,0(0,7) ; rko LG 1,8(0,7) ; offset of tqe_prev in 0000055 STG 1,8(0,15) ; offset of tqe_prev in 0000055 B @L366 @L365 DS 0H LG 15,8(0,7) ; offset of tqe_prev in 0000055 STG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq @L366 DS 0H LG 15,8(0,7) ; offset of tqe_prev in 0000055 LG 1,0(0,7) ; rko STG 1,0(0,15) * *** do { if(((&rkq->rkq_q)->tqh_first) == \ * ((void *)0)) { do { if (((rko)->rko_link .tqe_next = (&rkq->rkq_q)-\ * >tqh_first) != (((void *)0))) (&rkq->rkq_q)->tqh_first->rko_link .tq\ * e_prev = &(rko)->rko_link .tqe_next; else (&rkq->rkq_q)->tqh_last = \ * &(rko)->rko_link .tqe_next; (&rkq->rkq_q)->tqh_first = (rko); (rko)-\ * >rko_link .tqe_prev = &(&rkq->rkq_q)->tqh_first; } while ( 0); } els\ * e { rd_kafka_op_t * _tmp; for ((_tmp) = ((&rkq->rkq_q)->tqh_first); \ * (_tmp) != (((void *)0)); (_tmp) = ((_tmp)->rko_link .tqe_next)) { if\ * (rd_kafka_op_cmp_prio(rko,_tmp) < 0) { do { (rko)->rko_link .tqe_pr\ * ev = (_tmp)->rko_link .tqe_prev; (rko)->rko_link .tqe_next = (_tmp);\ * *(_tmp)->rko_link .tqe_prev = (rko); (_tmp)->rko_link .tqe_prev = &\ * (rko)->rko_link .tqe_next; } while ( 0); break; } if(!((_tmp)->rko_l\ * ink .tqe_next)) { do { if (((rko)->rko_link .tqe_next = (_tmp)->rko\ * _link .tqe_next) != (((void *)0))) (rko)->rko_link .tqe_next->rko_li\ * nk .tqe_prev = &(rko)->rko_link .tqe_next; else (&rkq->rkq_q)->tqh_l\ * ast = &(rko)->rko_link .tqe_next; (_tmp)->rko_link .tqe_next = (rko)\ * ; (rko)->rko_link .tqe_prev = &(_tmp)->rko_link .tqe_next; } while (\ * 0); break; } } } } while(0); @L367 DS 0H LTG 15,96(0,5) ; offset of rkq_q in rd_kafka_q_s BNE @L370 @L371 DS 0H LG 15,96(0,5) ; offset of rkq_q in rd_kafka_q_s STG 15,0(0,7) LTGR 15,15 BE @L374 LG 15,96(0,5) ; offset of rkq_q in rd_kafka_q_s STG 7,8(0,15) ; offset of tqe_prev in 0000055 B @L375 @L374 DS 0H STG 7,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L375 DS 0H STG 7,96(0,5) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,5) STG 15,8(0,7) ; offset of tqe_prev in 0000055 B @L376 @L370 DS 0H LG 3,96(0,5) ; offset of rkq_q in rd_kafka_q_s B @L378 @L377 DS 0H STG 7,176(0,13) STG 3,184(0,13) LA 1,176(0,13) LG 15,@lit_1450_96 ; rd_kafka_op_cmp_prio @@gen_label169 DS 0H BALR 14,15 @@gen_label170 DS 0H LTR 15,15 BNL @L381 @L382 DS 0H LG 15,8(0,3) ; offset of tqe_prev in 0000055 STG 15,8(0,7) ; offset of tqe_prev in 0000055 STG 3,0(0,7) ; rko LG 15,8(0,3) ; offset of tqe_prev in 0000055 STG 7,0(0,15) STG 7,8(0,3) ; offset of tqe_prev in 0000055 B @L379 @L381 DS 0H LTG 15,0(0,3) ; _tmp BNZ @L385 @L386 DS 0H LG 15,0(0,3) ; _tmp STG 15,0(0,7) LTGR 15,15 BE @L389 LG 15,0(0,7) ; rko STG 7,8(0,15) ; offset of tqe_prev in 0000055 B @L390 @L389 DS 0H STG 7,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L390 DS 0H STG 7,0(0,3) ; _tmp STG 3,8(0,7) ; offset of tqe_prev in 0000055 B @L379 @L385 DS 0H LG 3,0(0,3) ; _tmp @L378 DS 0H LTGR 15,3 BNE @L377 @L379 DS 0H @L376 DS 0H * *** * *** * *** } @L360 DS 0H LG 7,96(0,2) ; offset of rkq_q in rd_kafka_q_s LTGR 15,7 BZ @L391 CHSI 52(7),0 BNH @L391 B @L362 * *** * *** do { if (!(((&srcq->rkq_q)->tqh_first) == (((void *)0)))\ * ) { *(&rkq->rkq_q)->tqh_last = (&srcq->rkq_q)->tqh_first; (&srcq->rk\ * q_q)->tqh_first->rko_link .tqe_prev = (&rkq->rkq_q)->tqh_last; (&rkq\ * ->rkq_q)->tqh_last = (&srcq->rkq_q)->tqh_last; do { ((&srcq->rkq_q))\ * ->tqh_first = (((void *)0)); ((&srcq->rkq_q))->tqh_last = &((&srcq->\ * rkq_q))->tqh_first; } while ( 0); } } while ( 0); @L391 DS 0H LTG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s BE @L394 LG 15,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq LG 1,96(0,2) ; offset of rkq_q in rd_kafka_q_s STG 1,0(0,15) LG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s LG 1,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq STG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq STG 15,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L395 DS 0H LGHI 15,0 ; 0 STG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,2) STG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq @L394 DS 0H * *** if (rkq->rkq_qlen == 0) CHSI 112(5),0 BNE @L398 * *** rd_kafka_q_io_event(rkq); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_98 ; rd_kafka_q_io_event @@gen_label179 DS 0H BALR 14,15 @@gen_label180 DS 0H @L398 DS 0H * *** rkq->rkq_qlen += srcq->rkq_qlen; L 15,112(0,5) A 15,112(0,2) ST 15,112(0,5) * *** rkq->rkq_qsize += srcq->rkq_qsize; LG 15,120(0,5) AG 15,120(0,2) STG 15,120(0,5) * *** cnd_signal(&rkq->rkq_cond); LA 15,40(0,5) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_99 ; cnd_signal @@gen_label181 DS 0H BALR 14,15 @@gen_label182 DS 0H * *** * *** rd_kafka_q_mark_served(srcq); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_100 ; rd_kafka_q_mark_served @@gen_label183 DS 0H BALR 14,15 @@gen_label184 DS 0H * *** rd_kafka_q_reset(srcq); STG 2,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_101 ; rd_kafka_q_reset @@gen_label185 DS 0H BALR 14,15 @@gen_label186 DS 0H * *** } else B @L399 @L351 DS 0H * *** r = rd_kafka_q_concat0(rkq->rkq_fwdq ? rkq->rkq_fwdq : r\ * kq, * *** srcq, * *** rkq->rkq_fwdq ? do_lock : 0); LTG 15,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L400 LG 15,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s B @L401 @L400 DS 0H LGR 15,5 @L401 DS 0H LTG 1,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L402 LR 1,6 B @L403 @L402 DS 0H LHI 1,0 ; 0 @L403 DS 0H STG 15,176(0,13) STG 2,184(0,13) LGFR 15,1 STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1450_103 ; rd_kafka_q_concat0 @@gen_label189 DS 0H BALR 14,15 @@gen_label190 DS 0H LR 4,15 ; r @L399 DS 0H * *** if (do_lock) LTR 6,6 BZ @L404 * *** mtx_unlock(&rkq->rkq_lock); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1450_94 ; mtx_unlock @@gen_label192 DS 0H BALR 14,15 @@gen_label193 DS 0H @L404 DS 0H * *** * *** return r; LGFR 15,4 * *** } @ret_lab_1450 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_concat0" * (FUNCTION #1450) * @AUTO#rd_kafka_q_concat0 DSECT DS XL168 rd_kafka_q_concat0#r#0 DS 1F ; r * @CODE CSECT * * * * ....... start of rd_kafka_q_prepend0 @LNAME1451 DS 0H DC X'00000013' DC C'rd_kafka_q_prepend0' DC X'00' rd_kafka_q_prepend0 DCCPRLG CINDEX=1451,BASER=12,FRAME=192,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1451 * ******* End of Prologue * * * *** if (do_lock) LG 2,8(0,1) ; srcq L 3,20(0,1) ; do_lock LG 4,0(0,1) ; rkq LTR 3,3 BZ @L405 * *** mtx_lock(&rkq->rkq_lock); STG 4,168(0,13) LA 1,168(0,13) LG 15,@lit_1451_106 ; mtx_lock @@gen_label195 DS 0H BALR 14,15 @@gen_label196 DS 0H @L405 DS 0H * *** if (!rkq->rkq_fwdq && !srcq->rkq_fwdq) { LTG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L406 LTG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L406 * *** * *** * *** do { if (!(((&rkq->rkq_q)->tqh_first) == (((vo\ * id *)0)))) { *(&srcq->rkq_q)->tqh_last = (&rkq->rkq_q)->tqh_first; (\ * &rkq->rkq_q)->tqh_first->rko_link .tqe_prev = (&srcq->rkq_q)->tqh_la\ * st; (&srcq->rkq_q)->tqh_last = (&rkq->rkq_q)->tqh_last; do { ((&rkq-\ * >rkq_q))->tqh_first = (((void *)0)); ((&rkq->rkq_q))->tqh_last = &((\ * &rkq->rkq_q))->tqh_first; } while ( 0); } } while ( 0); @L407 DS 0H LTG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s BE @L410 LG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq LG 1,96(0,4) ; offset of rkq_q in rd_kafka_q_s STG 1,0(0,15) LG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s LG 1,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq STG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq STG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq @L411 DS 0H LGHI 15,0 ; 0 STG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,4) STG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq @L410 DS 0H * *** * *** do { if(((&srcq->rkq_q)->tqh_first)) { ((&srcq\ * ->rkq_q)->tqh_first)->rko_link .tqe_prev = &(&rkq->rkq_q)->tqh_first\ * ; (&rkq->rkq_q)->tqh_first = (&srcq->rkq_q)->tqh_first; (&rkq->rkq_q\ * )->tqh_last = (&srcq->rkq_q)->tqh_last; do { (&srcq->rkq_q)->tqh_fir\ * st = (((void *)0)); (&srcq->rkq_q)->tqh_last = &(&srcq->rkq_q)->tqh_\ * first; } while ( 0); } else do { (&rkq->rkq_q)->tqh_first = (((void \ * *)0)); (&rkq->rkq_q)->tqh_last = &(&rkq->rkq_q)->tqh_first; } while \ * ( 0); } while ( 0); @L414 DS 0H LTG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s BZ @L422 LG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s LA 1,96(0,4) STG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s STG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s LG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq STG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq @L418 DS 0H LGHI 15,0 ; 0 STG 15,96(0,2) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,2) STG 15,104(0,2) ; offset of tqh_last in rd_kafka_op_tailq B @L421 DS 0D @FRAMESIZE_1451 DC F'192' @lit_1451_106 DC AD(mtx_lock) @lit_1451_110 DC AD(rd_kafka_q_io_event) @lit_1451_111 DC AD(rd_kafka_q_mark_served) @lit_1451_112 DC AD(rd_kafka_q_reset) @lit_1451_114 DC AD(rd_kafka_q_prepend0) @lit_1451_115 DC AD(mtx_unlock) @L422 DS 0H LGHI 15,0 ; 0 STG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,4) STG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq @L421 DS 0H * *** if (rkq->rkq_qlen == 0 && srcq->rkq_qlen > 0) CHSI 112(4),0 BNE @L425 CHSI 112(2),0 BNH @L425 * *** rd_kafka_q_io_event(rkq); STG 4,168(0,13) LA 1,168(0,13) LG 15,@lit_1451_110 ; rd_kafka_q_io_event @@gen_label203 DS 0H BALR 14,15 @@gen_label204 DS 0H @L425 DS 0H * *** rkq->rkq_qlen += srcq->rkq_qlen; L 15,112(0,4) A 15,112(0,2) ST 15,112(0,4) * *** rkq->rkq_qsize += srcq->rkq_qsize; LG 15,120(0,4) AG 15,120(0,2) STG 15,120(0,4) * *** * *** rd_kafka_q_mark_served(srcq); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1451_111 ; rd_kafka_q_mark_served @@gen_label205 DS 0H BALR 14,15 @@gen_label206 DS 0H * *** rd_kafka_q_reset(srcq); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1451_112 ; rd_kafka_q_reset @@gen_label207 DS 0H BALR 14,15 @@gen_label208 DS 0H * *** } else B @L426 @L406 DS 0H * *** rd_kafka_q_prepend0(rkq->rkq_fwdq ? rkq->rkq_fwdq : rkq, * *** srcq->rkq_fwdq ? srcq->rkq\ * _fwdq : srcq, * *** rkq->rkq_fwdq ? do_lock : \ * 0); LTG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L427 LG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s B @L428 @L427 DS 0H LGR 15,4 @L428 DS 0H LTG 1,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L429 LG 2,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s B @L430 @L429 DS 0H @L430 DS 0H LTG 1,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L431 LR 1,3 B @L432 @L431 DS 0H LHI 1,0 ; 0 @L432 DS 0H STG 15,168(0,13) STG 2,176(0,13) LGFR 15,1 STG 15,184(0,13) LA 1,168(0,13) LG 15,@lit_1451_114 ; rd_kafka_q_prepend0 @@gen_label212 DS 0H BALR 14,15 @@gen_label213 DS 0H @L426 DS 0H * *** if (do_lock) LTR 3,3 BZ @ret_lab_1451 * *** mtx_unlock(&rkq->rkq_lock); STG 4,168(0,13) LA 1,168(0,13) LG 15,@lit_1451_115 ; mtx_unlock @@gen_label215 DS 0H BALR 14,15 @@gen_label216 DS 0H @L433 DS 0H * *** } @ret_lab_1451 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_prepend0" * (FUNCTION #1451) * @AUTO#rd_kafka_q_prepend0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_len @LNAME1452 DS 0H DC X'0000000E' DC C'rd_kafka_q_len' DC X'00' rd_kafka_q_len DCCPRLG CINDEX=1452,BASER=12,FRAME=192,ENTRY=NO,ARCH=ZAR* CH,LNAMEADDR=@LNAME1452 * ******* End of Prologue * * LG 3,0(0,1) ; rkq * *** int qlen; * *** rd_kafka_q_t *fwdq; * *** mtx_lock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1452_117 ; mtx_lock @@gen_label217 DS 0H BALR 14,15 @@gen_label218 DS 0H * *** if (!(fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 3,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1452_118 ; rd_kafka_q_fwd_get @@gen_label219 DS 0H BALR 14,15 @@gen_label220 DS 0H LGR 4,15 LTGR 15,4 BNZ @L434 * *** qlen = rkq->rkq_qlen; L 2,112(0,3) ; offset of rkq_qlen in rd_kafka_q_s * *** mtx_unlock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1452_119 ; mtx_unlock @@gen_label222 DS 0H BALR 14,15 @@gen_label223 DS 0H * *** } else { B @L435 DS 0D @FRAMESIZE_1452 DC F'192' @lit_1452_117 DC AD(mtx_lock) @lit_1452_118 DC AD(rd_kafka_q_fwd_get) @lit_1452_119 DC AD(mtx_unlock) @lit_1452_121 DC AD(rd_kafka_q_len) @lit_1452_122 DC AD(rd_kafka_q_destroy0) @L434 DS 0H * *** mtx_unlock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1452_119 ; mtx_unlock @@gen_label224 DS 0H BALR 14,15 @@gen_label225 DS 0H * *** qlen = rd_kafka_q_len(fwdq); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1452_121 ; rd_kafka_q_len @@gen_label226 DS 0H BALR 14,15 @@gen_label227 DS 0H LR 2,15 ; qlen * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 4,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1452_122 ; rd_kafka_q_destroy0 @@gen_label228 DS 0H BALR 14,15 @@gen_label229 DS 0H * *** } @L435 DS 0H * *** return qlen; LGFR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_len" * (FUNCTION #1452) * @AUTO#rd_kafka_q_len DSECT DS XL168 rd_kafka_q_len#qlen#0 DS 1F ; qlen * @CODE CSECT * * * * ....... start of rd_kafka_replyq_clear @LNAME1458 DS 0H DC X'00000015' DC C'rd_kafka_replyq_clear' DC X'00' rd_kafka_replyq_clear DCCPRLG CINDEX=1458,BASER=0,FRAME=168,SAVEAREA=NO* ,ENTRY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1458 * ******* End of Prologue * * * *** __memset(replyq,0,sizeof(*replyq)); LG 15,0(0,1) * setting 16 bytes to 0x00 XC 0(16,15),0(15) * *** } @ret_lab_1458 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue * * DSECT for automatic variables in "rd_kafka_replyq_clear" * (FUNCTION #1458) * @AUTO#rd_kafka_replyq_clear DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_replyq_destroy @LNAME1460 DS 0H DC X'00000017' DC C'rd_kafka_replyq_destroy' DC X'00' rd_kafka_replyq_destroy DCCPRLG CINDEX=1460,BASER=12,FRAME=184,ENTRY=NO* ,ARCH=ZARCH,LNAMEADDR=@LNAME1460 * ******* End of Prologue * * * *** if (replyq->q) LG 2,0(0,1) ; replyq LTG 15,0(0,2) ; replyq BZ @L445 * *** rd_kafka_q_destroy0(replyq->q, 0 ); LG 15,0(0,2) STG 15,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_1460_124 ; rd_kafka_q_destroy0 @@gen_label231 DS 0H BALR 14,15 @@gen_label232 DS 0H @L445 DS 0H * *** # 772 "C:\asgkafka\librdkafka\src\rdkafka_queue.h" * *** rd_kafka_replyq_clear(replyq); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1460_125 ; rd_kafka_replyq_clear @@gen_label233 DS 0H BALR 14,15 @@gen_label234 DS 0H * *** } @ret_lab_1460 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1460 DC F'184' @lit_1460_124 DC AD(rd_kafka_q_destroy0) @lit_1460_125 DC AD(rd_kafka_replyq_clear) DROP 12 * * DSECT for automatic variables in "rd_kafka_replyq_destroy" * (FUNCTION #1460) * @AUTO#rd_kafka_replyq_destroy DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_replyq_enq @LNAME1461 DS 0H DC X'00000013' DC C'rd_kafka_replyq_enq' DC X'00' rd_kafka_replyq_enq DCCPRLG CINDEX=1461,BASER=12,FRAME=192,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1461 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_q_t *rkq = replyq->q; LG 15,0(0,3) ; replyq LG 1,8(0,3) ; rko LG 2,0(0,15) ; replyq * *** int r; * *** * *** if (version) LT 3,20(0,3) ; version BZ @L446 * *** rko->rko_version = version; ST 3,28(0,1) ; offset of rko_version in rd_kafka_op_s B @L447 DS 0D @FRAMESIZE_1461 DC F'192' @lit_1461_128 DC AD(rd_kafka_q_enq) @lit_1461_129 DC AD(rd_kafka_q_destroy0) * *** else @L446 DS 0H * *** rko->rko_version = replyq->version; L 3,8(0,15) ; offset of version in rd_kafka_replyq_s ST 3,28(0,1) ; offset of rko_version in rd_kafka_op_s @L447 DS 0H * *** * *** * *** * *** replyq->q = ((void *)0); LGHI 3,0 ; 0 STG 3,0(0,15) ; replyq * *** * *** * *** # 807 "C:\asgkafka\librdkafka\src\rdkafka_queue.h" * *** * *** * *** * *** r = rd_kafka_q_enq(rkq, rko); STG 2,176(0,13) STG 1,184(0,13) LA 1,176(0,13) LG 15,@lit_1461_128 ; rd_kafka_q_enq @@gen_label236 DS 0H BALR 14,15 @@gen_label237 DS 0H LR 3,15 * *** * *** rd_kafka_q_destroy0(rkq, 0 ); STG 2,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1461_129 ; rd_kafka_q_destroy0 @@gen_label238 DS 0H BALR 14,15 @@gen_label239 DS 0H * *** * *** return r; LGFR 15,3 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_replyq_enq" * (FUNCTION #1461) * @AUTO#rd_kafka_replyq_enq DSECT DS XL168 rd_kafka_replyq_enq#r#0 DS 1F ; r * @CODE CSECT * * * * ....... start of rd_kafka_enq_once_destroy0 @LNAME1475 DS 0H DC X'0000001A' DC C'rd_kafka_enq_once_destroy0' DC X'00' rd_kafka_enq_once_destroy0 DCCPRLG CINDEX=1475,BASER=12,FRAME=200,ENTRY* =NO,ARCH=ZARCH,LNAMEADDR=@LNAME1475 * ******* End of Prologue * * LG 2,0(0,1) ; eonce * *** * *** * *** * *** ((!eonce->rko) ? (void)0 : __assert(__func__, "C:\\asg\ * kafka\\librdkafka\\src\\rdkafka_queue.h", 946, "!eonce->rko")); LTG 15,48(0,2) ; offset of rko in rd_kafka_enq_once_s BZ @L455 @L454 DS 0H LG 15,@lit_1475_131 LA 15,134(0,15) STG 15,168(0,13) LG 15,@lit_1475_132 LA 1,70(0,15) STG 1,176(0,13) MVGHI 184(13),946 LA 15,142(0,15) STG 15,192(0,13) LA 1,168(0,13) LG 15,@lit_1475_133 ; __assert @@gen_label241 DS 0H BALR 14,15 @@gen_label242 DS 0H @L455 DS 0H * *** ((!eonce->replyq.q) ? (void)0 : __assert(__func__, "C:\ * \\asgkafka\\librdkafka\\src\\rdkafka_queue.h", 947, "!eonce->replyq.\ * q")); LTG 15,56(0,2) ; offset of replyq in rd_kafka_enq_once_s BZ @L457 @L456 DS 0H LG 15,@lit_1475_131 LA 15,134(0,15) STG 15,168(0,13) LG 15,@lit_1475_132 LA 1,70(0,15) STG 1,176(0,13) MVGHI 184(13),947 LA 15,154(0,15) STG 15,192(0,13) LA 1,168(0,13) LG 15,@lit_1475_133 ; __assert @@gen_label244 DS 0H BALR 14,15 @@gen_label245 DS 0H @L457 DS 0H * *** * *** * *** * *** ((eonce->refcnt == 0) ? (void)0 : __assert(__func__, "\ * C:\\asgkafka\\librdkafka\\src\\rdkafka_queue.h", 951, "eonce->refcnt\ * == 0")); CHSI 40(2),0 BE @L459 @L458 DS 0H LG 15,@lit_1475_131 LA 15,134(0,15) STG 15,168(0,13) LG 15,@lit_1475_132 LA 1,70(0,15) STG 1,176(0,13) MVGHI 184(13),951 LA 15,172(0,15) STG 15,192(0,13) LA 1,168(0,13) LG 15,@lit_1475_133 ; __assert @@gen_label247 DS 0H BALR 14,15 @@gen_label248 DS 0H @L459 DS 0H * *** * *** mtx_destroy(&eonce->lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1475_140 ; mtx_destroy @@gen_label249 DS 0H BALR 14,15 @@gen_label250 DS 0H * *** rd_free(eonce); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1475_141 ; rd_free @@gen_label251 DS 0H BALR 14,15 @@gen_label252 DS 0H * *** } @ret_lab_1475 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1475 DC F'200' @lit_1475_133 DC AD(__assert) @lit_1475_132 DC AD(@strings@) @lit_1475_131 DC AD(@DATA) @lit_1475_140 DC AD(mtx_destroy) @lit_1475_141 DC AD(rd_free) DROP 12 * * DSECT for automatic variables in "rd_kafka_enq_once_destroy0" * (FUNCTION #1475) * @AUTO#rd_kafka_enq_once_destroy0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_enq_once_trigger @LNAME1480 DS 0H DC X'00000019' DC C'rd_kafka_enq_once_trigger' DC X'00' rd_kafka_enq_once_trigger DCCPRLG CINDEX=1480,BASER=12,FRAME=216,ENTRY=* NO,ARCH=ZARCH,LNAMEADDR=@LNAME1480 LGR 5,1 ; ptr to parm area * ******* End of Prologue * * LG 3,0(0,5) ; eonce * *** int do_destroy; * *** rd_kafka_op_t *rko = ((void *)0); LGHI 6,0 ; 0 LGR 2,6 ; rko * *** rd_kafka_replyq_t replyq = {}; * setting 16 bytes to 0x00 XC 168(16,13),168(13) * *** * *** mtx_lock(&eonce->lock); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1480_144 ; mtx_lock @@gen_label253 DS 0H BALR 14,15 @@gen_label254 DS 0H * *** * *** ((eonce->refcnt > 0) ? (void)0 : __assert(__func__, "C\ * :\\asgkafka\\librdkafka\\src\\rdkafka_queue.h", 1061, "eonce->refcnt\ * > 0")); CHSI 40(3),0 BH @L470 @L469 DS 0H LG 15,@lit_1480_145 LA 15,228(0,15) STG 15,184(0,13) LG 15,@lit_1480_146 LA 1,70(0,15) STG 1,192(0,13) MVGHI 200(13),1061 LA 15,192(0,15) STG 15,208(0,13) LA 1,184(0,13) LG 15,@lit_1480_147 ; __assert @@gen_label256 DS 0H BALR 14,15 @@gen_label257 DS 0H @L470 DS 0H * *** eonce->refcnt--; L 15,40(0,3) AHI 15,-1 ST 15,40(0,3) * *** do_destroy = eonce->refcnt == 0; LHI 15,0 ; 0 X 15,40(0,3) LPR 4,15 AHI 4,-1 SRL 4,31(0) * *** * *** if (eonce->rko) { LTG 15,48(0,3) ; offset of rko in rd_kafka_enq_once_s BZ @L471 * *** * *** # 1072 "C:\asgkafka\librdkafka\src\rdkafka_queue.h" * *** rko = eonce->rko; LG 2,48(0,3) ; offset of rko in rd_kafka_enq_once_s * *** replyq = eonce->replyq; MVC 168(16,13),56(3) * *** * *** eonce->rko = ((void *)0); STG 6,48(0,3) ; offset of rko in rd_kafka_enq_once_s * *** rd_kafka_replyq_clear(&eonce->replyq); LA 15,56(0,3) STG 15,184(0,13) LA 1,184(0,13) LG 15,@lit_1480_150 ; rd_kafka_replyq_clear @@gen_label259 DS 0H BALR 14,15 @@gen_label260 DS 0H * *** * *** * *** } @L471 DS 0H * *** mtx_unlock(&eonce->lock); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1480_151 ; mtx_unlock @@gen_label261 DS 0H BALR 14,15 @@gen_label262 DS 0H * *** * *** if (do_destroy) { LTR 4,4 BZ @L472 * *** * *** rd_kafka_enq_once_destroy0(eonce); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1480_152 ; rd_kafka_enq_once_destroy0 @@gen_label264 DS 0H BALR 14,15 @@gen_label265 DS 0H * *** } @L472 DS 0H * *** * *** if (rko) { LTGR 15,2 BZ @L473 * *** rko->rko_err = err; L 15,12(0,5) ; err ST 15,32(0,2) ; offset of rko_err in rd_kafka_op_s * *** rd_kafka_replyq_enq(&replyq, rko, replyq.versi\ * on); LA 15,168(0,13) STG 15,184(0,13) STG 2,192(0,13) LGF 15,176(0,13) STG 15,200(0,13) LA 1,184(0,13) LG 15,@lit_1480_153 ; rd_kafka_replyq_enq @@gen_label267 DS 0H BALR 14,15 @@gen_label268 DS 0H * *** rd_kafka_replyq_destroy(&replyq); LA 15,168(0,13) STG 15,184(0,13) LA 1,184(0,13) LG 15,@lit_1480_154 ; rd_kafka_replyq_destroy @@gen_label269 DS 0H BALR 14,15 @@gen_label270 DS 0H * *** } @L473 DS 0H * *** } @ret_lab_1480 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1480 DC F'216' @lit_1480_144 DC AD(mtx_lock) @lit_1480_147 DC AD(__assert) @lit_1480_146 DC AD(@strings@) @lit_1480_145 DC AD(@DATA) @lit_1480_150 DC AD(rd_kafka_replyq_clear) @lit_1480_151 DC AD(mtx_unlock) @lit_1480_152 DC AD(rd_kafka_enq_once_destroy0) @lit_1480_153 DC AD(rd_kafka_replyq_enq) @lit_1480_154 DC AD(rd_kafka_replyq_destroy) DROP 12 * * DSECT for automatic variables in "rd_kafka_enq_once_trigger" * (FUNCTION #1480) * @AUTO#rd_kafka_enq_once_trigger DSECT DS XL168 rd_kafka_enq_once_trigger#replyq#0 DS 16XL1 ; replyq ORG @AUTO#rd_kafka_enq_once_trigger+168 rd_kafka_enq_once_trigger#do_destroy#0 DS 1F ; do_destroy * @CODE CSECT * * * * ....... start of rd_kafka_op_version_outdated @LNAME1863 DS 0H DC X'0000001C' DC C'rd_kafka_op_version_outdated' DC X'00' rd_kafka_op_version_outdated DCCPRLG CINDEX=1863,BASER=12,FRAME=176,ENT* RY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1863 * ******* End of Prologue * * * *** if (!rko->rko_version) LG 15,0(0,1) ; rko LT 2,28(0,15) ; offset of rko_version in rd_kafka_op_s BNZ @L588 * *** return 0; LGHI 15,0 ; 0 B @ret_lab_1863 DS 0D @FRAMESIZE_1863 DC F'176' @lit_1863_157 DC AD(rd_atomic32_get) @L588 DS 0H * *** * *** if (version) LT 1,12(0,1) ; version BZ @L589 * *** return rko->rko_version < version; L 15,28(0,15) ; offset of rko_version in rd_kafka_op_s CR 15,1 BNL @@gen_label273 LHI 15,1 B @@gen_label274 @@gen_label273 DS 0H LHI 15,0 @@gen_label274 DS 0H LGFR 15,15 B @ret_lab_1863 @L589 DS 0H * *** * *** if (rko->rko_rktp) LTG 1,56(0,15) ; offset of rko_rktp in rd_kafka_op_s BZ @L590 * *** return rko->rko_version < L 2,28(0,15) ; offset of rko_version in rd_kafka_op_s * *** rd_atomic32_get(&rko->rko_rktp->rktp_version); LG 15,56(0,15) ; offset of rko_rktp in rd_kafka_op_s LA 15,432(0,15) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_1863_157 ; rd_atomic32_get @@gen_label276 DS 0H BALR 14,15 @@gen_label277 DS 0H CR 2,15 BNL @@gen_label278 LHI 15,1 B @@gen_label279 @@gen_label278 DS 0H LHI 15,0 @@gen_label279 DS 0H LGFR 15,15 B @ret_lab_1863 @L590 DS 0H * *** return 0; LGHI 15,0 ; 0 * *** } @ret_lab_1863 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_op_version_outdated" * (FUNCTION #1863) * @AUTO#rd_kafka_op_version_outdated DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_app_poll_blocking @LNAME1914 DS 0H DC X'0000001A' DC C'rd_kafka_app_poll_blocking' DC X'00' rd_kafka_app_poll_blocking DCCPRLG CINDEX=1914,BASER=12,FRAME=184,ENTRY* =NO,ARCH=ZARCH,LNAMEADDR=@LNAME1914 * ******* End of Prologue * * * *** if (rk->rk_type == RD_KAFKA_CONSUMER) LG 15,0(0,1) ; rk CHSI 2520(15),1 BNE @ret_lab_1914 * *** rd_atomic64_set(&rk->rk_ts_last_poll, 0x7fffff\ * ffffffffffLL); LA 15,2544(0,15) STG 15,168(0,13) LG 15,@lit_1914_161 ; 9223372036854775807 STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_1914_162 ; rd_atomic64_set @@gen_label281 DS 0H BALR 14,15 @@gen_label282 DS 0H @L628 DS 0H * *** } @ret_lab_1914 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1914 DC F'184' @lit_1914_162 DC AD(rd_atomic64_set) @lit_1914_161 DC FD'9223372036854775807' 0x7fffffffffffffff DROP 12 * * DSECT for automatic variables in "rd_kafka_app_poll_blocking" * (FUNCTION #1914) * @AUTO#rd_kafka_app_poll_blocking DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_app_polled @LNAME1915 DS 0H DC X'00000013' DC C'rd_kafka_app_polled' DC X'00' rd_kafka_app_polled DCCPRLG CINDEX=1915,BASER=12,FRAME=184,ENTRY=NO,ARC* H=ZARCH,LNAMEADDR=@LNAME1915 * ******* End of Prologue * * * *** if (rk->rk_type == RD_KAFKA_CONSUMER) LG 2,0(0,1) ; rk CHSI 2520(2),1 BNE @ret_lab_1915 * *** rd_atomic64_set(&rk->rk_ts_last_poll, rd_clock\ * ()); LG 15,@lit_1915_164 ; rd_clock @@gen_label284 DS 0H BALR 14,15 @@gen_label285 DS 0H LA 1,2544(0,2) STG 1,168(0,13) STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_1915_165 ; rd_atomic64_set @@gen_label286 DS 0H BALR 14,15 @@gen_label287 DS 0H @L629 DS 0H * *** } @ret_lab_1915 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1915 DC F'184' @lit_1915_164 DC AD(rd_clock) @lit_1915_165 DC AD(rd_atomic64_set) DROP 12 * * DSECT for automatic variables in "rd_kafka_app_polled" * (FUNCTION #1915) * @AUTO#rd_kafka_app_polled DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_yield rd_kafka_yield ALIAS X'99846D92818692816DA889859384' @LNAME569 DS 0H DC X'0000000E' DC C'rd_kafka_yield' DC X'00' rd_kafka_yield DCCPRLG CINDEX=569,BASER=12,FRAME=168,ENTRY=YES,ARCH=ZAR* CH,LNAMEADDR=@LNAME569 DCCPRV REG=15 ; Get PRV from DVT * ******* End of Prologue * * * *** rd_kafka_yield_thread = 1; LLGF 1,@lit_569_167 ; rd_kafka_yield_thread LA 15,0(1,15) MVHI 0(15),1 ; rd_kafka_yield_thread * *** } @ret_lab_569 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_569 DC F'168' @lit_569_167 DC Q(rd_kafka_yield_thread) DROP 12 * * DSECT for automatic variables in "rd_kafka_yield" * (FUNCTION #569) * @AUTO#rd_kafka_yield DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_check_yield @LNAME1943 DS 0H DC X'00000016' DC C'rd_kafka_q_check_yield' DC X'00' rd_kafka_q_check_yield DCCPRLG CINDEX=1943,BASER=12,FRAME=168,SAVEAREA=* NO,ENTRY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1943 * ******* End of Prologue * * * *** if (!(rkq->rkq_flags & 0x8)) LG 15,0(0,1) ; rkq TM 135(15),8 BNZ @L632 * *** return 0; LGHI 15,0 ; 0 B @ret_lab_1943 @L632 DS 0H * *** * *** rkq->rkq_flags &= ~0x8; L 1,132(0,15) NILL 1,65527 ST 1,132(0,15) * *** return 1; LGHI 15,1 ; 1 * *** } @ret_lab_1943 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_check_yield" * (FUNCTION #1943) * @AUTO#rd_kafka_q_check_yield DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_destroy_final rd_kafka_q_destroy_final ALIAS X'99846D92818692816D986D8485A2A39996A86D* 8689958193' @LNAME1427 DS 0H DC X'00000018' DC C'rd_kafka_q_destroy_final' DC X'00' rd_kafka_q_destroy_final DCCPRLG CINDEX=1427,BASER=12,FRAME=200,ENTRY=Y* ES,ARCH=ZARCH,LNAMEADDR=@LNAME1427 * ******* End of Prologue * * LG 2,0(0,1) ; rkq * *** * *** mtx_lock(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_171 ; mtx_lock @@gen_label289 DS 0H BALR 14,15 @@gen_label290 DS 0H * *** if (((rkq->rkq_qio != ((void *)0)))) { LTG 15,144(0,2) ; offset of rkq_qio in rd_kafka_q_s BE @L634 * *** rd_free(rkq->rkq_qio); LG 15,144(0,2) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_172 ; rd_free @@gen_label292 DS 0H BALR 14,15 @@gen_label293 DS 0H * *** rkq->rkq_qio = ((void *)0); LGHI 15,0 ; 0 STG 15,144(0,2) ; offset of rkq_qio in rd_kafka_q_s * *** } @L633 DS 0H * *** * *** * *** * *** do {} while (0); @L634 DS 0H * *** rd_kafka_q_disable0(rkq, 0); STG 2,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_1427_174 ; rd_kafka_q_disable0 @@gen_label294 DS 0H BALR 14,15 @@gen_label295 DS 0H * *** rd_kafka_q_fwd_set0(rkq, ((void *)0), 0, 0 ); STG 2,168(0,13) XC 176(24,13),176(13) LA 1,168(0,13) LG 15,@lit_1427_175 ; rd_kafka_q_fwd_set0 @@gen_label296 DS 0H BALR 14,15 @@gen_label297 DS 0H * *** rd_kafka_q_purge0(rkq, 0); STG 2,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_1427_176 ; rd_kafka_q_purge0 @@gen_label298 DS 0H BALR 14,15 @@gen_label299 DS 0H * *** ((!rkq->rkq_fwdq) ? (void)0 : __assert(__func__, "C:\\asgka\ * fka\\librdkafka\\src\\rdkafka_queue.c", 70, "!rkq->rkq_fwdq")); LTG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L638 @L637 DS 0H LG 15,@lit_1427_177 LA 15,422(0,15) STG 15,168(0,13) LG 15,@lit_1427_178 LA 1,210(0,15) STG 1,176(0,13) MVGHI 184(13),70 LA 15,254(0,15) STG 15,192(0,13) LA 1,168(0,13) LG 15,@lit_1427_179 ; __assert @@gen_label301 DS 0H BALR 14,15 @@gen_label302 DS 0H @L638 DS 0H * *** mtx_unlock(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_180 ; mtx_unlock @@gen_label303 DS 0H BALR 14,15 @@gen_label304 DS 0H * *** mtx_destroy(&rkq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_181 ; mtx_destroy @@gen_label305 DS 0H BALR 14,15 @@gen_label306 DS 0H * *** cnd_destroy(&rkq->rkq_cond); LA 15,40(0,2) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_182 ; cnd_destroy @@gen_label307 DS 0H BALR 14,15 @@gen_label308 DS 0H * *** * *** if (rkq->rkq_flags & 0x1) TM 135(2),1 BZ @ret_lab_1427 * *** rd_free(rkq); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1427_172 ; rd_free @@gen_label310 DS 0H BALR 14,15 @@gen_label311 DS 0H @L639 DS 0H * *** } @ret_lab_1427 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1427 DC F'200' @lit_1427_171 DC AD(mtx_lock) @lit_1427_172 DC AD(rd_free) @lit_1427_174 DC AD(rd_kafka_q_disable0) @lit_1427_175 DC AD(rd_kafka_q_fwd_set0) @lit_1427_176 DC AD(rd_kafka_q_purge0) @lit_1427_179 DC AD(__assert) @lit_1427_178 DC AD(@strings@) @lit_1427_177 DC AD(@DATA) @lit_1427_180 DC AD(mtx_unlock) @lit_1427_181 DC AD(mtx_destroy) @lit_1427_182 DC AD(cnd_destroy) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_destroy_final" * (FUNCTION #1427) * @AUTO#rd_kafka_q_destroy_final DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_init0 rd_kafka_q_init0 ALIAS X'99846D92818692816D986D899589A3F0' @LNAME1425 DS 0H DC X'00000010' DC C'rd_kafka_q_init0' DC X'00' rd_kafka_q_init0 DCCPRLG CINDEX=1425,BASER=12,FRAME=184,ENTRY=YES,ARCH=* ZARCH,LNAMEADDR=@LNAME1425 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_q_reset(rkq); LG 2,0(0,3) ; rkq STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1425_185 ; rd_kafka_q_reset @@gen_label312 DS 0H BALR 14,15 @@gen_label313 DS 0H * *** rkq->rkq_fwdq = ((void *)0); LGHI 15,0 ; 0 STG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s * *** rkq->rkq_refcnt = 1; MVHI 128(2),1 ; offset of rkq_refcnt in rd_kafka_q_s * *** rkq->rkq_flags = 0x2; MVHI 132(2),2 ; offset of rkq_flags in rd_kafka_q_s * *** rkq->rkq_rk = rk; LG 1,8(0,3) ; rk STG 1,136(0,2) ; offset of rkq_rk in rd_kafka_q_s * *** rkq->rkq_qio = ((void *)0); STG 15,144(0,2) ; offset of rkq_qio in rd_kafka_q_s * *** rkq->rkq_serve = ((void *)0); STG 15,152(0,2) ; offset of rkq_serve in rd_kafka_q_s * *** rkq->rkq_opaque = ((void *)0); STG 15,160(0,2) ; offset of rkq_opaque in rd_kafka_q_s * *** mtx_init(&rkq->rkq_lock, 0); STG 2,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_1425_190 ; mtx_init @@gen_label314 DS 0H BALR 14,15 @@gen_label315 DS 0H * *** cnd_init(&rkq->rkq_cond); LA 15,40(0,2) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_1425_191 ; cnd_init @@gen_label316 DS 0H BALR 14,15 @@gen_label317 DS 0H * *** * *** * *** * *** rkq->rkq_name = func; LG 15,16(0,3) ; func STG 15,168(0,2) ; offset of rkq_name in rd_kafka_q_s * *** * *** } @ret_lab_1425 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1425 DC F'184' @lit_1425_185 DC AD(rd_kafka_q_reset) @lit_1425_190 DC AD(mtx_init) @lit_1425_191 DC AD(cnd_init) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_init0" * (FUNCTION #1425) * @AUTO#rd_kafka_q_init0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_new0 rd_kafka_q_new0 ALIAS X'99846D92818692816D986D9585A6F0' @LNAME1426 DS 0H DC X'0000000F' DC C'rd_kafka_q_new0' DC X'00' rd_kafka_q_new0 DCCPRLG CINDEX=1426,BASER=12,FRAME=208,ENTRY=YES,ARCH=Z* ARCH,LNAMEADDR=@LNAME1426 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_q_t *rkq = rd_malloc(sizeof(*rkq)); MVGHI 176(13),176 LA 1,176(0,13) LG 15,@lit_1426_193 ; rd_malloc @@gen_label318 DS 0H BALR 14,15 @@gen_label319 DS 0H LGR 2,15 * *** rd_kafka_q_init0(rkq,rk,__FUNCTION__,109); STG 2,176(0,13) LG 15,0(0,3) ; rk STG 15,184(0,13) LG 15,@lit_1426_194 LA 15,448(0,15) STG 15,192(0,13) MVGHI 200(13),109 LA 1,176(0,13) LG 15,@lit_1426_195 ; rd_kafka_q_init0 @@gen_label320 DS 0H BALR 14,15 @@gen_label321 DS 0H * *** rkq->rkq_flags |= 0x1; L 15,132(0,2) OILL 15,1 ST 15,132(0,2) * *** * *** * *** * *** rkq->rkq_name = func; LG 15,8(0,3) ; func STG 15,168(0,2) ; offset of rkq_name in rd_kafka_q_s * *** * *** return rkq; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1426 DC F'208' @lit_1426_193 DC AD(rd_malloc) @lit_1426_195 DC AD(rd_kafka_q_init0) @lit_1426_194 DC AD(@DATA) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_new0" * (FUNCTION #1426) * @AUTO#rd_kafka_q_new0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_fwd_set0 rd_kafka_q_fwd_set0 ALIAS X'99846D92818692816D986D86A6846DA285A3F0' @LNAME1438 DS 0H DC X'00000013' DC C'rd_kafka_q_fwd_set0' DC X'00' rd_kafka_q_fwd_set0 DCCPRLG CINDEX=1438,BASER=12,FRAME=192,ENTRY=YES,AR* CH=ZARCH,LNAMEADDR=@LNAME1438 LGR 4,1 ; ptr to parm area * ******* End of Prologue * * LMG 2,3,0(4) ; srcq * *** * *** if (do_lock) LT 15,20(0,4) ; do_lock BZ @L640 * *** mtx_lock(&srcq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1438_197 ; mtx_lock @@gen_label323 DS 0H BALR 14,15 @@gen_label324 DS 0H @L640 DS 0H * *** if (fwd_app) LT 15,28(0,4) ; fwd_app BZ @L641 * *** srcq->rkq_flags |= 0x4; L 15,132(0,2) OILL 15,4 ST 15,132(0,2) @L641 DS 0H * *** if (srcq->rkq_fwdq) { LTG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L642 * *** rd_kafka_q_destroy0(srcq->rkq_fwdq, 0 ); LG 15,88(0,2) STG 15,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_1438_198 ; rd_kafka_q_destroy0 @@gen_label327 DS 0H BALR 14,15 @@gen_label328 DS 0H * *** srcq->rkq_fwdq = ((void *)0); LGHI 15,0 ; 0 STG 15,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s * *** } @L642 DS 0H * *** if (destq) { LTGR 15,3 BZ @L643 * *** rd_kafka_q_keep(destq); STG 3,168(0,13) LA 1,168(0,13) LG 15,@lit_1438_200 ; rd_kafka_q_keep @@gen_label330 DS 0H BALR 14,15 @@gen_label331 DS 0H * *** * *** * *** * *** if (srcq->rkq_qlen > 0) { CHSI 112(2),0 BNH @L644 * *** do {} while (0); @L645 DS 0H * *** rd_kafka_q_concat0(destq,srcq,1 ); STG 3,168(0,13) STG 2,176(0,13) MVGHI 184(13),1 LA 1,168(0,13) LG 15,@lit_1438_201 ; rd_kafka_q_concat0 @@gen_label333 DS 0H BALR 14,15 @@gen_label334 DS 0H * *** } @L644 DS 0H * *** * *** srcq->rkq_fwdq = destq; STG 3,88(0,2) ; offset of rkq_fwdq in rd_kafka_q_s * *** } @L643 DS 0H * *** if (do_lock) LT 15,20(0,4) ; do_lock BZ @ret_lab_1438 * *** mtx_unlock(&srcq->rkq_lock); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1438_202 ; mtx_unlock @@gen_label336 DS 0H BALR 14,15 @@gen_label337 DS 0H @L648 DS 0H * *** } @ret_lab_1438 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1438 DC F'192' @lit_1438_197 DC AD(mtx_lock) @lit_1438_198 DC AD(rd_kafka_q_destroy0) @lit_1438_200 DC AD(rd_kafka_q_keep) @lit_1438_201 DC AD(rd_kafka_q_concat0) @lit_1438_202 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_fwd_set0" * (FUNCTION #1438) * @AUTO#rd_kafka_q_fwd_set0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_purge0 rd_kafka_q_purge0 ALIAS X'99846D92818692816D986D97A4998785F0' @LNAME1433 DS 0H DC X'00000011' DC C'rd_kafka_q_purge0' DC X'00' rd_kafka_q_purge0 DCCPRLG CINDEX=1433,BASER=12,FRAME=200,ENTRY=YES,ARCH* =ZARCH,LNAMEADDR=@LNAME1433 * ******* End of Prologue * * LG 3,0(0,1) ; rkq L 4,12(0,1) ; do_lock * *** rd_kafka_op_t *rko, *next; * *** struct { struct rd_kafka_op_s *tqh_first; struct rd_kafka_o\ * p_s * *tqh_last; } tmpq = { (((void *)0)), &(tmpq).tqh_first }; LA 15,168(0,13) STG 15,176(0,13) * setting 8 bytes to 0x00 XC 168(8,13),168(13) * *** rd_kafka_q_t *fwdq; * *** int cnt = 0; LHI 2,0 ; 0 * *** * *** if (do_lock) LTR 4,4 BZ @L649 * *** mtx_lock(&rkq->rkq_lock); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_205 ; mtx_lock @@gen_label339 DS 0H BALR 14,15 @@gen_label340 DS 0H @L649 DS 0H * *** * *** if ((fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 3,184(0,13) XC 192(8,13),192(13) LA 1,184(0,13) LG 15,@lit_1433_206 ; rd_kafka_q_fwd_get @@gen_label341 DS 0H BALR 14,15 @@gen_label342 DS 0H LGR 5,15 LTGR 15,5 BZ @L652 * *** if (do_lock) LTR 4,4 BZ @L651 * *** mtx_unlock(&rkq->rkq_lock); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_207 ; mtx_unlock @@gen_label345 DS 0H BALR 14,15 @@gen_label346 DS 0H @L651 DS 0H * *** cnt = rd_kafka_q_purge0(fwdq, 1 ); STG 5,184(0,13) MVGHI 192(13),1 LA 1,184(0,13) LG 15,@lit_1433_208 ; rd_kafka_q_purge0 @@gen_label347 DS 0H BALR 14,15 @@gen_label348 DS 0H LR 2,15 ; cnt * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 5,184(0,13) XC 192(8,13),192(13) LA 1,184(0,13) LG 15,@lit_1433_209 ; rd_kafka_q_destroy0 @@gen_label349 DS 0H BALR 14,15 @@gen_label350 DS 0H * *** return cnt; LGFR 15,2 B @ret_lab_1433 DS 0D @FRAMESIZE_1433 DC F'200' @lit_1433_205 DC AD(mtx_lock) @lit_1433_206 DC AD(rd_kafka_q_fwd_get) @lit_1433_207 DC AD(mtx_unlock) @lit_1433_208 DC AD(rd_kafka_q_purge0) @lit_1433_209 DC AD(rd_kafka_q_destroy0) @lit_1433_212 DC AD(rd_kafka_q_mark_served) @lit_1433_213 DC AD(rd_kafka_q_reset) @lit_1433_215 DC AD(rd_kafka_op_destroy) * *** } * *** * *** * *** * *** do { if(((&rkq->rkq_q)->tqh_first)) { ((&rkq->rkq_q)->tqh_f\ * irst)->rko_link .tqe_prev = &(&tmpq)->tqh_first; (&tmpq)->tqh_first \ * = (&rkq->rkq_q)->tqh_first; (&tmpq)->tqh_last = (&rkq->rkq_q)->tqh_l\ * ast; do { (&rkq->rkq_q)->tqh_first = (((void *)0)); (&rkq->rkq_q)->t\ * qh_last = &(&rkq->rkq_q)->tqh_first; } while ( 0); } else do { (&tmp\ * q)->tqh_first = (((void *)0)); (&tmpq)->tqh_last = &(&tmpq)->tqh_fir\ * st; } while ( 0); } while ( 0); @L652 DS 0H LTG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s BZ @L660 LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s LA 1,168(0,13) STG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s STG 15,168(0,13) LG 15,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq STG 15,176(0,13) ; offset of tqh_last in 0000155 @L656 DS 0H LGHI 15,0 ; 0 STG 15,96(0,3) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,3) STG 15,104(0,3) ; offset of tqh_last in rd_kafka_op_tailq B @L659 @L660 DS 0H LGHI 15,0 ; 0 STG 15,168(0,13) LA 15,168(0,13) STG 15,176(0,13) ; offset of tqh_last in 0000155 @L659 DS 0H * *** * *** rd_kafka_q_mark_served(rkq); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_212 ; rd_kafka_q_mark_served @@gen_label352 DS 0H BALR 14,15 @@gen_label353 DS 0H * *** * *** * *** rd_kafka_q_reset(rkq); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_213 ; rd_kafka_q_reset @@gen_label354 DS 0H BALR 14,15 @@gen_label355 DS 0H * *** * *** if (do_lock) LTR 4,4 BZ @L663 * *** mtx_unlock(&rkq->rkq_lock); STG 3,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_207 ; mtx_unlock @@gen_label357 DS 0H BALR 14,15 @@gen_label358 DS 0H @L663 DS 0H * *** * *** * *** next = ((&tmpq)->tqh_first); LG 3,168(0,13) * *** while ((rko = next)) { B @L667 @L666 DS 0H * *** next = ((next)->rko_link .tqe_next); LG 3,0(0,3) ; next * *** rd_kafka_op_destroy(rko); STG 15,184(0,13) LA 1,184(0,13) LG 15,@lit_1433_215 ; rd_kafka_op_destroy @@gen_label359 DS 0H BALR 14,15 @@gen_label360 DS 0H * *** cnt++; AHI 2,1 * *** } @L667 DS 0H LGR 15,3 ; rko LTGR 1,3 BNZ @L666 * *** * *** return cnt; LGFR 15,2 * *** } @ret_lab_1433 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_purge0" * (FUNCTION #1433) * @AUTO#rd_kafka_q_purge0 DSECT DS XL168 rd_kafka_q_purge0#cnt#0 DS 1F ; cnt ORG @AUTO#rd_kafka_q_purge0+168 rd_kafka_q_purge0#tmpq#0 DS 16XL1 ; tmpq * @CODE CSECT * * * * ....... start of rd_kafka_q_purge_toppar_version rd_kafka_q_purge_toppar_version ALIAS X'99846D92818692816D986D97A499878* 56DA396979781996DA58599A2899695' @LNAME1434 DS 0H DC X'0000001F' DC C'rd_kafka_q_purge_toppar_version' DC X'00' rd_kafka_q_purge_toppar_version DCCPRLG CINDEX=1434,BASER=12,FRAME=208,* ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1434 LGR 6,1 ; ptr to parm area * ******* End of Prologue * * LG 5,0(0,6) ; rkq * *** rd_kafka_op_t *rko, *next; * *** struct { struct rd_kafka_op_s *tqh_first; struct rd_kafka_o\ * p_s * *tqh_last; } tmpq = { (((void *)0)), &(tmpq).tqh_first }; LA 15,168(0,13) STG 15,176(0,13) * setting 8 bytes to 0x00 XC 168(8,13),168(13) * *** int32_t cnt = 0; LHI 3,0 ; 0 * *** int64_t size = 0; LGHI 2,0 ; 0 * *** rd_kafka_q_t *fwdq; * *** * *** mtx_lock(&rkq->rkq_lock); STG 5,184(0,13) LA 1,184(0,13) LG 15,@lit_1434_219 ; mtx_lock @@gen_label362 DS 0H BALR 14,15 @@gen_label363 DS 0H * *** * *** if ((fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 5,184(0,13) XC 192(8,13),192(13) LA 1,184(0,13) LG 15,@lit_1434_220 ; rd_kafka_q_fwd_get @@gen_label364 DS 0H BALR 14,15 @@gen_label365 DS 0H LGR 4,15 LTGR 15,4 BZ @L672 * *** mtx_unlock(&rkq->rkq_lock); STG 5,184(0,13) LA 1,184(0,13) LG 15,@lit_1434_221 ; mtx_unlock @@gen_label367 DS 0H BALR 14,15 @@gen_label368 DS 0H * *** rd_kafka_q_purge_toppar_version(fwdq, rktp, ve\ * rsion); STG 4,184(0,13) LG 15,8(0,6) ; rktp STG 15,192(0,13) LGF 15,20(0,6) ; version STG 15,200(0,13) LA 1,184(0,13) LG 15,@lit_1434_222 ; rd_kafka_q_purge_toppar_version @@gen_label369 DS 0H BALR 14,15 @@gen_label370 DS 0H * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 4,184(0,13) XC 192(8,13),192(13) LA 1,184(0,13) LG 15,@lit_1434_223 ; rd_kafka_q_destroy0 @@gen_label371 DS 0H BALR 14,15 @@gen_label372 DS 0H * *** return; B @ret_lab_1434 DS 0D @FRAMESIZE_1434 DC F'208' @lit_1434_219 DC AD(mtx_lock) @lit_1434_220 DC AD(rd_kafka_q_fwd_get) @lit_1434_221 DC AD(mtx_unlock) @lit_1434_222 DC AD(rd_kafka_q_purge_toppar_version) @lit_1434_223 DC AD(rd_kafka_q_destroy0) @lit_1434_225 DC AD(rd_kafka_q_mark_served) @lit_1434_227 DC AD(rd_kafka_op_destroy) * *** } * *** * *** * *** * *** while ((rko = ((&rkq->rkq_q)->tqh_first)) && rko->rko_\ * rktp && * *** do { if (((rko)->rko_link .tqe_next) != (((v\ * oid *)0))) (rko)->rko_link .tqe_next->rko_link .tqe_prev = (rko)->rk\ * o_link .tqe_prev; else (&rkq->rkq_q)->tqh_last = (rko)->rko_link .tq\ * e_prev; *(rko)->rko_link .tqe_prev = (rko)->rko_link .tqe_next; ; } \ * while ( 0); @L674 DS 0H LTG 1,0(0,15) ; rko BE @L677 LG 1,0(0,15) ; rko LG 4,8(0,15) ; offset of tqe_prev in 0000055 STG 4,8(0,1) ; offset of tqe_prev in 0000055 B @L678 @L677 DS 0H LG 1,8(0,15) ; offset of tqe_prev in 0000055 STG 1,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L678 DS 0H LG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 4,0(0,15) ; rko STG 4,0(0,1) * *** do { (rko)->rko_link .tqe_next = (((void *)0)\ * ); (rko)->rko_link .tqe_prev = (&tmpq)->tqh_last; *(&tmpq)->tqh_last\ * = (rko); (&tmpq)->tqh_last = &(rko)->rko_link .tqe_next; } while ( \ * 0); @L679 DS 0H LGHI 1,0 ; 0 STG 1,0(0,15) ; rko LG 1,176(0,13) ; offset of tqh_last in 0000156 STG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 1,176(0,13) ; offset of tqh_last in 0000156 STG 15,0(0,1) STG 15,176(0,13) ; offset of tqh_last in 0000156 * *** cnt++; AHI 3,1 * *** size += rko->rko_len; AGF 2,48(0,15) * *** } @L672 DS 0H LG 15,96(0,5) ; offset of rkq_q in rd_kafka_q_s LTGR 1,15 BZ @L673 LTG 1,56(0,15) ; offset of rko_rktp in rd_kafka_op_s BZ @L673 * *** rko->rko_rktp == rktp && LG 1,56(0,15) ; offset of rko_rktp in rd_kafka_op_s LG 4,8(0,6) ; rktp CGR 1,4 BNE @L673 * *** rko->rko_version < version) { L 1,28(0,15) ; offset of rko_version in rd_kafka_op_s C 1,20(0,6) BL @L674 @L673 DS 0H * *** * *** rd_kafka_q_mark_served(rkq); STG 5,184(0,13) LA 1,184(0,13) LG 15,@lit_1434_225 ; rd_kafka_q_mark_served @@gen_label378 DS 0H BALR 14,15 @@gen_label379 DS 0H * *** * *** rkq->rkq_qlen -= cnt; L 15,112(0,5) SR 15,3 ST 15,112(0,5) * *** rkq->rkq_qsize -= size; LG 15,120(0,5) SGR 15,2 STG 15,120(0,5) * *** mtx_unlock(&rkq->rkq_lock); STG 5,184(0,13) LA 1,184(0,13) LG 15,@lit_1434_221 ; mtx_unlock @@gen_label380 DS 0H BALR 14,15 @@gen_label381 DS 0H * *** * *** next = ((&tmpq)->tqh_first); LG 2,168(0,13) * *** while ((rko = next)) { B @L685 @L684 DS 0H * *** next = ((next)->rko_link .tqe_next); LG 2,0(0,2) ; next * *** rd_kafka_op_destroy(rko); STG 15,184(0,13) LA 1,184(0,13) LG 15,@lit_1434_227 ; rd_kafka_op_destroy @@gen_label382 DS 0H BALR 14,15 @@gen_label383 DS 0H * *** } @L685 DS 0H LGR 15,2 ; rko LTGR 1,2 BNZ @L684 * *** } @ret_lab_1434 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_purge_toppar_version" * (FUNCTION #1434) * @AUTO#rd_kafka_q_purge_toppar_version DSECT DS XL168 rd_kafka_q_purge_toppar_version#size#0 DS 8XL1 ; size ORG @AUTO#rd_kafka_q_purge_toppar_version+168 rd_kafka_q_purge_toppar_version#cnt#0 DS 1F ; cnt ORG @AUTO#rd_kafka_q_purge_toppar_version+168 rd_kafka_q_purge_toppar_version#tmpq#0 DS 16XL1 ; tmpq * @CODE CSECT * * * * ....... start of rd_kafka_q_move_cnt rd_kafka_q_move_cnt ALIAS X'99846D92818692816D986D9496A5856D8395A3' @LNAME1465 DS 0H DC X'00000013' DC C'rd_kafka_q_move_cnt' DC X'00' rd_kafka_q_move_cnt DCCPRLG CINDEX=1465,BASER=12,FRAME=208,ENTRY=YES,AR* CH=ZARCH,LNAMEADDR=@LNAME1465 * ******* End of Prologue * * LMG 4,5,0(1) ; dstq L 6,20(0,1) ; cnt L 7,28(0,1) ; do_locks * *** rd_kafka_op_t *rko; * *** int mcnt = 0; LHI 3,0 ; 0 * *** * *** if (do_locks) { LTR 7,7 BZ @L686 * *** mtx_lock(&srcq->rkq_lock); STG 5,176(0,13) LA 1,176(0,13) LG 2,@lit_1465_230 ; mtx_lock LGR 15,2 @@gen_label386 DS 0H BALR 14,15 @@gen_label387 DS 0H * *** mtx_lock(&dstq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LGR 15,2 @@gen_label388 DS 0H BALR 14,15 @@gen_label389 DS 0H * *** } @L686 DS 0H * *** * *** if (!dstq->rkq_fwdq && !srcq->rkq_fwdq) { LTG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L687 LTG 15,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BNZ @L687 * *** if (cnt > 0 && dstq->rkq_qlen == 0) LTR 6,6 BNH @L688 CHSI 112(4),0 BNE @L688 * *** rd_kafka_q_io_event(dstq); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1465_232 ; rd_kafka_q_io_event @@gen_label394 DS 0H BALR 14,15 @@gen_label395 DS 0H @L688 DS 0H * *** * *** * *** * *** if (cnt == -1 || CHI 6,-1 BE @L690 * *** cnt >= (int)srcq->rkq_qlen) { C 6,112(0,5) BL @L695 @L690 DS 0H * *** mcnt = srcq->rkq_qlen; L 3,112(0,5) ; offset of rkq_qlen in rd_kafka_q_s * *** rd_kafka_q_concat0(dstq, srcq, 0); STMG 4,5,176(13) XC 192(8,13),192(13) LA 1,176(0,13) LG 15,@lit_1465_233 ; rd_kafka_q_concat0 @@gen_label398 DS 0H BALR 14,15 @@gen_label399 DS 0H * *** } else { B @L691 DS 0D @FRAMESIZE_1465 DC F'208' @lit_1465_230 DC AD(mtx_lock) @lit_1465_232 DC AD(rd_kafka_q_io_event) @lit_1465_233 DC AD(rd_kafka_q_concat0) @lit_1465_235 DC AD(rd_kafka_op_cmp_prio) @lit_1465_236 DC AD(rd_kafka_q_mark_served) @lit_1465_237 DC AD(rd_kafka_q_move_cnt) @lit_1465_238 DC AD(mtx_unlock) * *** while (mcnt < cnt && * *** do { if (((rko)->rko_link .tqe_next) != (((void \ * *)0))) (rko)->rko_link .tqe_next->rko_link .tqe_prev = (rko)->rko_li\ * nk .tqe_prev; else (&srcq->rkq_q)->tqh_last = (rko)->rko_link .tqe_p\ * rev; *(rko)->rko_link .tqe_prev = (rko)->rko_link .tqe_next; ; } whi\ * le ( 0); @L697 DS 0H LTG 15,0(0,8) ; rko BE @L700 LG 15,0(0,8) ; rko LG 1,8(0,8) ; offset of tqe_prev in 0000055 STG 1,8(0,15) ; offset of tqe_prev in 0000055 B @L701 @L700 DS 0H LG 15,8(0,8) ; offset of tqe_prev in 0000055 STG 15,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L701 DS 0H LG 15,8(0,8) ; offset of tqe_prev in 0000055 LG 1,0(0,8) ; rko STG 1,0(0,15) * *** if (((!rko->rko_prio))) LT 15,52(0,8) ; offset of rko_prio in rd_kafka_op_s BNZ @L707 * *** do { (rko)->rko_link \ * .tqe_next = (((void *)0)); (rko)->rko_link .tqe_prev = (&dstq->rkq_q\ * )->tqh_last; *(&dstq->rkq_q)->tqh_last = (rko); (&dstq->rkq_q)->tqh_\ * last = &(rko)->rko_link .tqe_next; } while ( 0); @L703 DS 0H LGHI 15,0 ; 0 STG 15,0(0,8) ; rko LG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq STG 15,8(0,8) ; offset of tqe_prev in 0000055 LG 15,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq STG 8,0(0,15) STG 8,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq * *** * *** else B @L706 * *** do { if(((&dstq->rkq_q\ * )->tqh_first) == ((void *)0)) { do { if (((rko)->rko_link .tqe_next\ * = (&dstq->rkq_q)->tqh_first) != (((void *)0))) (&dstq->rkq_q)->tqh_\ * first->rko_link .tqe_prev = &(rko)->rko_link .tqe_next; else (&dstq-\ * >rkq_q)->tqh_last = &(rko)->rko_link .tqe_next; (&dstq->rkq_q)->tqh_\ * first = (rko); (rko)->rko_link .tqe_prev = &(&dstq->rkq_q)->tqh_firs\ * t; } while ( 0); } else { rd_kafka_op_t * _tmp; for ((_tmp) = ((&dst\ * q->rkq_q)->tqh_first); (_tmp) != (((void *)0)); (_tmp) = ((_tmp)->rk\ * o_link .tqe_next)) { if(rd_kafka_op_cmp_prio(rko,_tmp) < 0) { do { \ * (rko)->rko_link .tqe_prev = (_tmp)->rko_link .tqe_prev; (rko)->rko_l\ * ink .tqe_next = (_tmp); *(_tmp)->rko_link .tqe_prev = (rko); (_tmp)-\ * >rko_link .tqe_prev = &(rko)->rko_link .tqe_next; } while ( 0); brea\ * k; } if(!((_tmp)->rko_link .tqe_next)) { do { if (((rko)->rko_link \ * .tqe_next = (_tmp)->rko_link .tqe_next) != (((void *)0))) (rko)->rko\ * _link .tqe_next->rko_link .tqe_prev = &(rko)->rko_link .tqe_next; el\ * se (&dstq->rkq_q)->tqh_last = &(rko)->rko_link .tqe_next; (_tmp)->rk\ * o_link .tqe_next = (rko); (rko)->rko_link .tqe_prev = &(_tmp)->rko_l\ * ink .tqe_next; } while ( 0); break; } } } } while(0); @L707 DS 0H LTG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s BNE @L710 @L711 DS 0H LG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s STG 15,0(0,8) LTGR 15,15 BE @L714 LG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s STG 8,8(0,15) ; offset of tqe_prev in 0000055 B @L715 @L714 DS 0H STG 8,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq @L715 DS 0H STG 8,96(0,4) ; offset of rkq_q in rd_kafka_q_s LA 15,96(0,4) STG 15,8(0,8) ; offset of tqe_prev in 0000055 B @L716 @L710 DS 0H LG 2,96(0,4) ; offset of rkq_q in rd_kafka_q_s B @L718 @L717 DS 0H STG 8,176(0,13) STG 2,184(0,13) LA 1,176(0,13) LG 15,@lit_1465_235 ; rd_kafka_op_cmp_prio @@gen_label404 DS 0H BALR 14,15 @@gen_label405 DS 0H LTR 15,15 BNL @L721 @L722 DS 0H LG 15,8(0,2) ; offset of tqe_prev in 0000055 STG 15,8(0,8) ; offset of tqe_prev in 0000055 STG 2,0(0,8) ; rko LG 15,8(0,2) ; offset of tqe_prev in 0000055 STG 8,0(0,15) STG 8,8(0,2) ; offset of tqe_prev in 0000055 B @L719 @L721 DS 0H LTG 15,0(0,2) ; _tmp BNZ @L725 @L726 DS 0H LG 15,0(0,2) ; _tmp STG 15,0(0,8) LTGR 15,15 BE @L729 LG 15,0(0,8) ; rko STG 8,8(0,15) ; offset of tqe_prev in 0000055 B @L730 @L729 DS 0H STG 8,104(0,4) ; offset of tqh_last in rd_kafka_op_tailq @L730 DS 0H STG 8,0(0,2) ; _tmp STG 2,8(0,8) ; offset of tqe_prev in 0000055 B @L719 @L725 DS 0H LG 2,0(0,2) ; _tmp @L718 DS 0H LTGR 15,2 BNE @L717 @L719 DS 0H @L716 DS 0H * *** * *** * *** * *** * *** srcq->rkq_qlen--; @L706 DS 0H L 15,112(0,5) AHI 15,-1 ST 15,112(0,5) * *** dstq->rkq_qlen++; L 15,112(0,4) AHI 15,1 ST 15,112(0,4) * *** srcq->rkq_qsize -= rko->rko_le\ * n; LG 15,120(0,5) SGF 15,48(0,8) STG 15,120(0,5) * *** dstq->rkq_qsize += rko->rko_le\ * n; LG 15,120(0,4) AGF 15,48(0,8) STG 15,120(0,4) * *** mcnt++; AHI 3,1 * *** } @L695 DS 0H CR 3,6 BNL @L691 * *** (rko = ((&srcq->rkq_q)->tqh_first))) { LG 8,96(0,5) ; offset of rkq_q in rd_kafka_q_s LTGR 15,8 BZ @L691 B @L697 * *** } @L691 DS 0H * *** * *** rd_kafka_q_mark_served(srcq); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1465_236 ; rd_kafka_q_mark_served @@gen_label412 DS 0H BALR 14,15 @@gen_label413 DS 0H * *** * *** } else B @L731 @L687 DS 0H * *** mcnt = rd_kafka_q_move_cnt(dstq->rkq_fwdq ? dstq->rkq_fw\ * dq:dstq, * *** srcq->rkq_fwdq ? srcq->rkq_fwdq:srcq, * *** cnt, do_locks); LTG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L732 LG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s B @L733 @L732 DS 0H LGR 15,4 @L733 DS 0H LTG 1,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L734 LG 1,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s B @L735 @L734 DS 0H LGR 1,5 @L735 DS 0H STG 15,176(0,13) STG 1,184(0,13) LGFR 15,6 STG 15,192(0,13) LGFR 15,7 STG 15,200(0,13) LA 1,176(0,13) LG 15,@lit_1465_237 ; rd_kafka_q_move_cnt @@gen_label416 DS 0H BALR 14,15 @@gen_label417 DS 0H LR 3,15 ; mcnt @L731 DS 0H * *** * *** if (do_locks) { LTR 7,7 BZ @L736 * *** mtx_unlock(&dstq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LG 2,@lit_1465_238 ; mtx_unlock LGR 15,2 @@gen_label419 DS 0H BALR 14,15 @@gen_label420 DS 0H * *** mtx_unlock(&srcq->rkq_lock); STG 5,176(0,13) LA 1,176(0,13) LGR 15,2 @@gen_label421 DS 0H BALR 14,15 @@gen_label422 DS 0H * *** } @L736 DS 0H * *** * *** return mcnt; LGFR 15,3 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_move_cnt" * (FUNCTION #1465) * @AUTO#rd_kafka_q_move_cnt DSECT DS XL168 rd_kafka_q_move_cnt#mcnt#0 DS 1F ; mcnt * @CODE CSECT * * * * ....... start of rd_kafka_op_filter @LNAME1944 DS 0H DC X'00000012' DC C'rd_kafka_op_filter' DC X'00' rd_kafka_op_filter DCCPRLG CINDEX=1944,BASER=12,FRAME=184,ENTRY=NO,ARCH* =ZARCH,LNAMEADDR=@LNAME1944 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** if (((!rko))) LG 2,8(0,3) ; rko LTGR 15,2 BNZ @L737 * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_1944 DS 0D @FRAMESIZE_1944 DC F'184' @lit_1944_242 DC AD(rd_kafka_op_version_outdated) @lit_1944_243 DC AD(rd_kafka_q_deq0) @lit_1944_244 DC AD(rd_kafka_op_destroy) @L737 DS 0H * *** * *** if (((rd_kafka_op_version_outdated(rko, version)))) { STG 2,168(0,13) LGF 15,20(0,3) ; version STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_1944_242 ; rd_kafka_op_version_outdated @@gen_label424 DS 0H BALR 14,15 @@gen_label425 DS 0H LTR 15,15 BZ @L738 * *** rd_kafka_q_deq0(rkq, rko); LG 15,0(0,3) ; rkq STG 15,168(0,13) STG 2,176(0,13) LA 1,168(0,13) LG 15,@lit_1944_243 ; rd_kafka_q_deq0 @@gen_label427 DS 0H BALR 14,15 @@gen_label428 DS 0H * *** rd_kafka_op_destroy(rko); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_1944_244 ; rd_kafka_op_destroy @@gen_label429 DS 0H BALR 14,15 @@gen_label430 DS 0H * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_1944 * *** } @L738 DS 0H * *** * *** return rko; LGR 15,2 * *** } @ret_lab_1944 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_op_filter" * (FUNCTION #1944) * @AUTO#rd_kafka_op_filter DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_pop_serve rd_kafka_q_pop_serve ALIAS X'99846D92818692816D986D9796976DA28599A585' @LNAME1462 DS 0H DC X'00000014' DC C'rd_kafka_q_pop_serve' DC X'00' rd_kafka_q_pop_serve DCCPRLG CINDEX=1462,BASER=12,FRAME=240,ENTRY=YES,A* RCH=ZARCH,LNAMEADDR=@LNAME1462 DCCPRV REG=2 ; Get PRV from DVT LGR 5,1 ; ptr to parm area * ******* End of Prologue * * LG 3,0(0,5) ; rkq * *** rd_kafka_op_t *rko; * *** rd_kafka_q_t *fwdq; * *** * *** do {} while (0); @L739 DS 0H * *** * *** mtx_lock(&rkq->rkq_lock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_247 ; mtx_lock @@gen_label431 DS 0H BALR 14,15 @@gen_label432 DS 0H * *** * *** rd_kafka_yield_thread = 0; LLGF 15,@lit_1462_248 ; rd_kafka_yield_thread LA 15,0(15,2) MVHI 0(15),0 ; rd_kafka_yield_thread * *** if (!(fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 3,192(0,13) XC 200(8,13),200(13) LA 1,192(0,13) LG 15,@lit_1462_249 ; rd_kafka_q_fwd_get @@gen_label433 DS 0H BALR 14,15 @@gen_label434 DS 0H LGR 4,15 LTGR 15,4 BNZ @L742 * *** struct timespec timeout_tspec; * *** * *** rd_timeout_init_timespec_us(&timeout_tspec, ti\ * meout_us); LA 15,168(0,13) STG 15,192(0,13) LG 15,8(0,5) ; timeout_us STG 15,200(0,13) LA 1,192(0,13) LG 15,@lit_1462_250 ; rd_timeout_init_timespec_us @@gen_label436 DS 0H BALR 14,15 @@gen_label437 DS 0H * *** * *** while (1) { @L745 DS 0H * *** rd_kafka_op_res_t res; * *** * *** * *** rd_bool_t is_locked = 1; MVI 184(13),1 ; is_locked * *** * *** * *** retry: * *** while ((rko = ((&rkq->rkq_q)->tqh_firs\ * t)) && @_retry@1462@0 DS 0H B @L750 DS 0D @FRAMESIZE_1462 DC F'240' @lit_1462_247 DC AD(mtx_lock) @lit_1462_249 DC AD(rd_kafka_q_fwd_get) @lit_1462_248 DC Q(rd_kafka_yield_thread) @lit_1462_250 DC AD(rd_timeout_init_timespec_us) @lit_1462_251 DC AD(rd_kafka_op_filter) @lit_1462_252 DC AD(rd_kafka_q_mark_served) @lit_1462_253 DC AD(rd_kafka_q_deq0) @lit_1462_254 DC AD(mtx_unlock) @lit_1462_255 DC AD(rd_kafka_op_handle) @lit_1462_258 DC AD(rd_kafka_q_check_yield) @lit_1462_262 DC AD(cnd_timedwait_abs) @lit_1462_266 DC AD(rd_kafka_q_pop_serve) @lit_1462_267 DC AD(rd_kafka_q_destroy0) * *** ; @L750 DS 0H LG 2,96(0,3) ; offset of rkq_q in rd_kafka_q_s LTGR 15,2 BZ @L751 * *** !(rko = rd_kafka_op_filter(rkq,\ * rko, version))) STG 3,192(0,13) STG 2,200(0,13) LGF 15,20(0,5) ; version STG 15,208(0,13) LA 1,192(0,13) LG 15,@lit_1462_251 ; rd_kafka_op_filter @@gen_label439 DS 0H BALR 14,15 @@gen_label440 DS 0H LTGR 2,15 ; rko BZ @L750 @L751 DS 0H * *** * *** rd_kafka_q_mark_served(rkq); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_252 ; rd_kafka_q_mark_served @@gen_label442 DS 0H BALR 14,15 @@gen_label443 DS 0H * *** * *** if (rko) { LTGR 15,2 BZ @L752 * *** * *** rd_kafka_q_deq0(rkq, rko); STG 3,192(0,13) STG 2,200(0,13) LA 1,192(0,13) LG 15,@lit_1462_253 ; rd_kafka_q_deq0 @@gen_label445 DS 0H BALR 14,15 @@gen_label446 DS 0H * *** * *** * *** * *** mtx_unlock(&rkq->rkq_lock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_254 ; mtx_unlock @@gen_label447 DS 0H BALR 14,15 @@gen_label448 DS 0H * *** is_locked = 0; MVI 184(13),0 ; is_locked * *** * *** * *** * *** * *** res = rd_kafka_op_handle(rkq->\ * rkq_rk, rkq, rko, * *** cb_ty\ * pe, opaque, * *** callb\ * ack); LG 15,136(0,3) STG 15,192(0,13) STG 3,200(0,13) STG 2,208(0,13) LGF 15,28(0,5) ; cb_type STG 15,216(0,13) LG 15,40(0,5) ; opaque STG 15,224(0,13) LG 15,32(0,5) ; callback STG 15,232(0,13) LA 1,192(0,13) LG 15,@lit_1462_255 ; rd_kafka_op_handle @@gen_label449 DS 0H BALR 14,15 @@gen_label450 DS 0H * *** * *** if (res == RD_KAFKA_OP_RES_HAN\ * DLED || CHI 15,1 BE @L754 * *** res == RD_KAFKA_OP_RES_KEE\ * P) { CHI 15,2 BNE @L753 @L754 DS 0H * *** mtx_lock(&rkq->rkq_loc\ * k); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_247 ; mtx_lock @@gen_label453 DS 0H BALR 14,15 @@gen_label454 DS 0H * *** is_locked = 1; MVI 184(13),1 ; is_locked * *** goto retry; B @L750 * *** } else if (((res == RD_KAFKA_O\ * P_RES_YIELD))) { @L753 DS 0H CHI 15,3 BNE @L762 * *** * *** * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_1462 * *** } else * *** break; * *** } @L752 DS 0H * *** * *** if (((rd_kafka_q_check_yield(rkq)))) { STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_258 ; rd_kafka_q_check_yield @@gen_label456 DS 0H BALR 14,15 @@gen_label457 DS 0H NILF 15,X'000000FF' LTR 15,15 BZ @L758 * *** if (is_locked) CLI 184(13),0 BE @L759 * *** mtx_unlock(&rkq->rkq_l\ * ock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_254 ; mtx_unlock @@gen_label460 DS 0H BALR 14,15 @@gen_label461 DS 0H @L759 DS 0H * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_1462 * *** } @L758 DS 0H * *** * *** if (!is_locked) CLI 184(13),0 BNE @L760 * *** mtx_lock(&rkq->rkq_lock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_247 ; mtx_lock @@gen_label463 DS 0H BALR 14,15 @@gen_label464 DS 0H @L760 DS 0H * *** * *** if (cnd_timedwait_abs(&rkq->rkq_cond, * *** &rkq->rkq_lock, * *** &timeout_tspec) \ * != LA 15,40(0,3) STG 15,192(0,13) STG 3,200(0,13) LA 15,168(0,13) STG 15,208(0,13) LA 1,192(0,13) LG 15,@lit_1462_262 ; cnd_timedwait_abs @@gen_label465 DS 0H BALR 14,15 @@gen_label466 DS 0H * *** 0) { LTR 15,15 BE @L761 * *** mtx_unlock(&rkq->rkq_lock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_254 ; mtx_unlock @@gen_label468 DS 0H BALR 14,15 @@gen_label469 DS 0H * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_1462 * *** } @L761 DS 0H * *** } @L746 DS 0H B @L745 @L743 DS 0H * *** * *** } else { @L742 DS 0H * *** * *** * *** mtx_unlock(&rkq->rkq_lock); STG 3,192(0,13) LA 1,192(0,13) LG 15,@lit_1462_254 ; mtx_unlock @@gen_label470 DS 0H BALR 14,15 @@gen_label471 DS 0H * *** rko = rd_kafka_q_pop_serve(fwdq, timeout_us, version, * *** cb_type, callback, opaque); STG 4,192(0,13) LG 15,8(0,5) ; timeout_us STG 15,200(0,13) LGF 15,20(0,5) ; version STG 15,208(0,13) LGF 15,28(0,5) ; cb_type STG 15,216(0,13) LG 15,32(0,5) ; callback STG 15,224(0,13) LG 15,40(0,5) ; opaque STG 15,232(0,13) LA 1,192(0,13) LG 15,@lit_1462_266 ; rd_kafka_q_pop_serve @@gen_label472 DS 0H BALR 14,15 @@gen_label473 DS 0H LGR 2,15 ; rko * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 4,192(0,13) XC 200(8,13),200(13) LA 1,192(0,13) LG 15,@lit_1462_267 ; rd_kafka_q_destroy0 @@gen_label474 DS 0H BALR 14,15 @@gen_label475 DS 0H * *** } @L762 DS 0H * *** * *** * *** return rko; LGR 15,2 * *** } @ret_lab_1462 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_pop_serve" * (FUNCTION #1462) * @AUTO#rd_kafka_q_pop_serve DSECT DS XL168 rd_kafka_q_pop_serve#res#3 DS 1F ; res ORG @AUTO#rd_kafka_q_pop_serve+168 rd_kafka_q_pop_serve#timeout_tspec#2 DS 16XL1 ; timeout_tspec ORG @AUTO#rd_kafka_q_pop_serve+184 rd_kafka_q_pop_serve#is_locked#3 DS 1CL1 ; is_locked * @CODE CSECT * * * * ....... start of rd_kafka_q_pop rd_kafka_q_pop ALIAS X'99846D92818692816D986D979697' @LNAME1463 DS 0H DC X'0000000E' DC C'rd_kafka_q_pop' DC X'00' rd_kafka_q_pop DCCPRLG CINDEX=1463,BASER=12,FRAME=216,ENTRY=YES,ARCH=ZA* RCH,LNAMEADDR=@LNAME1463 * ******* End of Prologue * * * *** return rd_kafka_q_pop_serve(rkq, timeout_us, version, * *** RD_KAFKA_Q_CB_RETURN, * *** ((void *)0), ((void *)0)); LG 15,0(0,1) ; rkq STG 15,168(0,13) LG 15,8(0,1) ; timeout_us STG 15,176(0,13) LGF 15,20(0,1) ; version STG 15,184(0,13) MVGHI 192(13),2 XC 200(16,13),200(13) LA 1,168(0,13) LG 15,@lit_1463_269 ; rd_kafka_q_pop_serve @@gen_label476 DS 0H BALR 14,15 @@gen_label477 DS 0H * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1463 DC F'216' @lit_1463_269 DC AD(rd_kafka_q_pop_serve) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_pop" * (FUNCTION #1463) * @AUTO#rd_kafka_q_pop DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_serve rd_kafka_q_serve ALIAS X'99846D92818692816D986DA28599A585' @LNAME1464 DS 0H DC X'00000010' DC C'rd_kafka_q_serve' DC X'00' rd_kafka_q_serve DCCPRLG CINDEX=1464,BASER=12,FRAME=408,ENTRY=YES,ARCH=* ZARCH,LNAMEADDR=@LNAME1464 DCCPRV REG=7 ; Get PRV from DVT LGR 8,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_t *rk = rkq->rkq_rk; LG 4,0(0,8) ; rkq L 5,20(0,8) ; max_cnt LG 6,136(0,4) ; offset of rkq_rk in rd_kafka_q_s * *** rd_kafka_op_t *rko; * *** rd_kafka_q_t localq; * *** rd_kafka_q_t *fwdq; * *** int cnt = 0; LHI 3,0 ; 0 * *** struct timespec timeout_tspec; * *** * *** do {} while (0); @L763 DS 0H * *** * *** mtx_lock(&rkq->rkq_lock); STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_272 ; mtx_lock @@gen_label478 DS 0H BALR 14,15 @@gen_label479 DS 0H * *** * *** do {} while (0); @L766 DS 0H * *** if ((fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 4,360(0,13) XC 368(8,13),368(13) LA 1,360(0,13) LG 15,@lit_1464_273 ; rd_kafka_q_fwd_get @@gen_label480 DS 0H BALR 14,15 @@gen_label481 DS 0H LGR 2,15 LTGR 15,2 BZ @L769 * *** int ret; * *** * *** * *** mtx_unlock(&rkq->rkq_lock); STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_274 ; mtx_unlock @@gen_label483 DS 0H BALR 14,15 @@gen_label484 DS 0H * *** ret = rd_kafka_q_serve(fwdq, timeout_ms, max_cnt, * *** cb_type, callback, opaq\ * ue); STG 2,360(0,13) LGF 15,12(0,8) ; timeout_ms STG 15,368(0,13) LGFR 15,5 STG 15,376(0,13) LGF 15,28(0,8) ; cb_type STG 15,384(0,13) LG 15,32(0,8) ; callback STG 15,392(0,13) LG 15,40(0,8) ; opaque STG 15,400(0,13) LA 1,360(0,13) LG 15,@lit_1464_275 ; rd_kafka_q_serve @@gen_label485 DS 0H BALR 14,15 @@gen_label486 DS 0H LR 3,15 * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 2,360(0,13) XC 368(8,13),368(13) LA 1,360(0,13) LG 15,@lit_1464_276 ; rd_kafka_q_destroy0 @@gen_label487 DS 0H BALR 14,15 @@gen_label488 DS 0H * *** return ret; LGFR 15,3 B @ret_lab_1464 DS 0D @FRAMESIZE_1464 DC F'408' @lit_1464_272 DC AD(mtx_lock) @lit_1464_273 DC AD(rd_kafka_q_fwd_get) @lit_1464_274 DC AD(mtx_unlock) @lit_1464_275 DC AD(rd_kafka_q_serve) @lit_1464_276 DC AD(rd_kafka_q_destroy0) @lit_1464_277 DC AD(rd_timeout_init_timespec) @lit_1464_278 DC AD(rd_kafka_q_check_yield) @lit_1464_279 DC AD(cnd_timedwait_abs) @lit_1464_280 DC AD(rd_kafka_q_mark_served) @lit_1464_284 DC AD(rd_kafka_q_init0) @lit_1464_283 DC AD(@DATA) @lit_1464_286 DC AD(rd_kafka_q_move_cnt) @lit_1464_288 DC Q(rd_kafka_yield_thread) @lit_1464_289 DC AD(rd_kafka_q_deq0) @lit_1464_290 DC AD(rd_kafka_op_handle) @lit_1464_293 DC AD(rd_kafka_crash) @lit_1464_291 DC AD(@strings@) @lit_1464_295 DC AD(rd_kafka_q_prepend0) @lit_1464_296 DC AD(rd_kafka_q_destroy_owner) * *** } @L769 DS 0H * *** * *** rd_timeout_init_timespec(&timeout_tspec, timeout_ms); LA 15,168(0,13) STG 15,360(0,13) LGF 15,12(0,8) ; timeout_ms STG 15,368(0,13) LA 1,360(0,13) LG 15,@lit_1464_277 ; rd_timeout_init_timespec @@gen_label489 DS 0H BALR 14,15 @@gen_label490 DS 0H * *** * *** * *** while (!(rko = ((&rkq->rkq_q)->tqh_first)) && * *** ; @L773 DS 0H LG 2,96(0,4) ; offset of rkq_q in rd_kafka_q_s LTGR 15,2 BNZ @L774 * *** !rd_kafka_q_check_yield(rkq) && STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_278 ; rd_kafka_q_check_yield @@gen_label492 DS 0H BALR 14,15 @@gen_label493 DS 0H NILF 15,X'000000FF' LTR 15,15 BNZ @L774 * *** cnd_timedwait_abs(&rkq->rkq_cond, &rkq->rkq_loc\ * k, * *** &timeout_tspec) == 0) LA 15,40(0,4) STG 15,360(0,13) STG 4,368(0,13) LA 15,168(0,13) STG 15,376(0,13) LA 1,360(0,13) LG 15,@lit_1464_279 ; cnd_timedwait_abs @@gen_label495 DS 0H BALR 14,15 @@gen_label496 DS 0H LTR 15,15 BE @L773 @L774 DS 0H * *** * *** rd_kafka_q_mark_served(rkq); STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_280 ; rd_kafka_q_mark_served @@gen_label498 DS 0H BALR 14,15 @@gen_label499 DS 0H * *** * *** if (!rko) { LTGR 15,2 BNZ @L775 * *** mtx_unlock(&rkq->rkq_lock); STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_274 ; mtx_unlock @@gen_label501 DS 0H BALR 14,15 @@gen_label502 DS 0H * *** return 0; LGHI 15,0 ; 0 B @ret_lab_1464 * *** } @L775 DS 0H * *** * *** * *** rd_kafka_q_init0(&localq,rkq->rkq_rk,__FUNCTION__,494); LA 15,184(0,13) STG 15,360(0,13) LG 15,136(0,4) STG 15,368(0,13) LG 15,@lit_1464_283 LA 15,464(0,15) STG 15,376(0,13) MVGHI 384(13),494 LA 1,360(0,13) LG 15,@lit_1464_284 ; rd_kafka_q_init0 @@gen_label503 DS 0H BALR 14,15 @@gen_label504 DS 0H * *** rd_kafka_q_move_cnt(&localq, rkq, max_cnt == 0 ? -1 : max_c\ * nt, * *** 0); LTR 5,5 BNE @L776 LHI 5,-1 ; -1 B @L777 @L776 DS 0H @L777 DS 0H LA 15,184(0,13) STG 15,360(0,13) STG 4,368(0,13) LGFR 15,5 STG 15,376(0,13) XC 384(8,13),384(13) LA 1,360(0,13) LG 15,@lit_1464_286 ; rd_kafka_q_move_cnt @@gen_label506 DS 0H BALR 14,15 @@gen_label507 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 4,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_274 ; mtx_unlock @@gen_label508 DS 0H BALR 14,15 @@gen_label509 DS 0H * *** * *** rd_kafka_yield_thread = 0; LLGF 15,@lit_1464_288 ; rd_kafka_yield_thread LA 15,0(15,7) MVHI 0(15),0 ; rd_kafka_yield_thread * *** * *** * *** while ((rko = ((&localq.rkq_q)->tqh_first))) { B @L781 @L780 DS 0H * *** rd_kafka_op_res_t res; * *** * *** rd_kafka_q_deq0(&localq, rko); LA 15,184(0,13) STG 15,360(0,13) STG 2,368(0,13) LA 1,360(0,13) LG 15,@lit_1464_289 ; rd_kafka_q_deq0 @@gen_label510 DS 0H BALR 14,15 @@gen_label511 DS 0H * *** res = rd_kafka_op_handle(rk, &localq, rko, cb_\ * type, * *** opaque, callback); STG 6,360(0,13) LA 15,184(0,13) STG 15,368(0,13) STG 2,376(0,13) LGF 15,28(0,8) ; cb_type STG 15,384(0,13) LG 15,40(0,8) ; opaque STG 15,392(0,13) LG 15,32(0,8) ; callback STG 15,400(0,13) LA 1,360(0,13) LG 15,@lit_1464_290 ; rd_kafka_op_handle @@gen_label512 DS 0H BALR 14,15 @@gen_label513 DS 0H LR 2,15 * *** * *** do { if (((!(res != RD_KAFKA_OP_RES_PASS)))) r\ * d_kafka_crash("C:\\asgkafka\\librdkafka\\src\\rdkafka_queue.c",510, \ * __FUNCTION__, (((void *)0)), "assert: " "res != RD_KAFKA_OP_RES_PASS\ * "); } while (0); @L782 DS 0H LTR 2,2 BNE @L785 LG 15,@lit_1464_291 LA 1,210(0,15) STG 1,360(0,13) MVGHI 368(13),510 LG 1,@lit_1464_283 LA 1,464(0,1) STG 1,376(0,13) XC 384(8,13),384(13) LA 15,270(0,15) STG 15,392(0,13) LA 1,360(0,13) LG 15,@lit_1464_293 ; rd_kafka_crash @@gen_label515 DS 0H BALR 14,15 @@gen_label516 DS 0H @L785 DS 0H * *** cnt++; AHI 3,1 * *** * *** if (((res == RD_KAFKA_OP_RES_YIELD || rd_kafka\ * _yield_thread))) { CHI 2,3 BE @L787 LLGF 15,@lit_1464_288 ; rd_kafka_yield_thread LT 15,0(15,7) ; rd_kafka_yield_thread BZ @L786 @L787 DS 0H * *** * *** * *** * *** * *** if (!(((&localq.rkq_q)->tqh_first) == \ * (((void *)0)))) LTG 15,280(0,13) ; offset of rkq_q in rd_kafka_q_s BE @L778 * *** rd_kafka_q_prepend0(rkq,&local\ * q,1 ); STG 4,360(0,13) LA 15,184(0,13) STG 15,368(0,13) MVGHI 376(13),1 LA 1,360(0,13) LG 15,@lit_1464_295 ; rd_kafka_q_prepend0 @@gen_label520 DS 0H BALR 14,15 @@gen_label521 DS 0H @L788 DS 0H * *** break; B @L778 * *** } @L786 DS 0H * *** } @L781 DS 0H LG 2,280(0,13) ; offset of rkq_q in rd_kafka_q_s LTGR 15,2 BNZ @L780 @L778 DS 0H * *** * *** rd_kafka_q_destroy_owner(&localq); LA 15,184(0,13) STG 15,360(0,13) LA 1,360(0,13) LG 15,@lit_1464_296 ; rd_kafka_q_destroy_owner @@gen_label523 DS 0H BALR 14,15 @@gen_label524 DS 0H * *** * *** return cnt; LGFR 15,3 * *** } @ret_lab_1464 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_serve" * (FUNCTION #1464) * @AUTO#rd_kafka_q_serve DSECT DS XL168 rd_kafka_q_serve#res#5 DS 1F ; res ORG @AUTO#rd_kafka_q_serve+168 rd_kafka_q_serve#ret#3 DS 1F ; ret ORG @AUTO#rd_kafka_q_serve+168 rd_kafka_q_serve#timeout_tspec#0 DS 16XL1 ; timeout_tspec ORG @AUTO#rd_kafka_q_serve+168 rd_kafka_q_serve#cnt#0 DS 1F ; cnt ORG @AUTO#rd_kafka_q_serve+184 rd_kafka_q_serve#localq#0 DS 176XL1 ; localq * @CODE CSECT * * * * ....... start of rd_kafka_purge_outdated_messages @LNAME1945 DS 0H DC X'00000020' DC C'rd_kafka_purge_outdated_messages' DC X'00' rd_kafka_purge_outdated_messages DCCPRLG CINDEX=1945,BASER=12,FRAME=192* ,ENTRY=NO,ARCH=ZARCH,LNAMEADDR=@LNAME1945 LGR 6,1 ; ptr to parm area * ******* End of Prologue * * * *** size_t valid_count = 0; LG 4,8(0,6) ; rkmessages LGHI 2,0 ; 0 * *** size_t i; * *** * *** for (i = 0; i < cnt; i++) { LGR 3,2 ; i B @L790 DS 0D @FRAMESIZE_1945 DC F'192' @lit_1945_300 DC AD(rd_kafka_op_version_outdated) @lit_1945_301 DC AD(rd_kafka_op_destroy) @L789 DS 0H * *** rd_kafka_op_t *rko; * *** rko = rkmessages[i]->_private; SLLG 15,3,3(0) ; *0x8 LG 15,0(15,4) LG 5,64(0,15) ; offset of _private in rd_kafka_message_s * *** if (rd_kafka_op_version_outdated(rko, version)\ * ) { STG 5,176(0,13) LGF 15,4(0,6) ; version STG 15,184(0,13) LA 1,176(0,13) LG 15,@lit_1945_300 ; rd_kafka_op_version_outdated @@gen_label525 DS 0H BALR 14,15 @@gen_label526 DS 0H LTR 15,15 BZ @L793 * *** * *** rd_kafka_op_destroy(rko); STG 5,176(0,13) LA 1,176(0,13) LG 15,@lit_1945_301 ; rd_kafka_op_destroy @@gen_label528 DS 0H BALR 14,15 @@gen_label529 DS 0H * *** } else if (i > valid_count) { B @L794 @L793 DS 0H CLGR 3,2 BNH @L795 * *** rkmessages[valid_count++] = rkmessages\ * [i]; LGR 15,2 AGHI 2,1 SLLG 15,15,3(0) ; *0x8 SLLG 1,3,3(0) ; *0x8 LG 1,0(1,4) STG 1,0(15,4) * *** } else { B @L794 @L795 DS 0H * *** valid_count++; AGHI 2,1 * *** } @L796 DS 0H * *** } @L794 DS 0H AGHI 3,1 @L790 DS 0H CLG 3,16(0,6) BL @L789 * *** return valid_count; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_purge_outdated_messages" * (FUNCTION #1945) * @AUTO#rd_kafka_purge_outdated_messages DSECT DS XL168 rd_kafka_purge_outdated_messages#i#0 DS 8XL1 ; i ORG @AUTO#rd_kafka_purge_outdated_messages+168 rd_kafka_purge_outdated_messages#valid_count#0 DS 8XL1 ; valid_count * @CODE CSECT * * * * ....... start of rd_kafka_q_serve_rkmessages rd_kafka_q_serve_rkmessages ALIAS X'99846D92818692816D986DA28599A5856D9* 9929485A2A2818785A2' @LNAME1466 DS 0H DC X'0000001B' DC C'rd_kafka_q_serve_rkmessages' DC X'00' rd_kafka_q_serve_rkmessages DCCPRLG CINDEX=1466,BASER=12,FRAME=240,ENTR* Y=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1466 DCCPRV REG=8 ; Get PRV from DVT LGR 9,1 ; ptr to parm area * ******* End of Prologue * * * *** unsigned int cnt = 0; L 3,12(0,9) ; timeout_ms LG 4,16(0,9) ; rkmessages LG 7,0(0,9) ; rkq LHI 2,0 ; 0 * *** struct { struct rd_kafka_op_s *tqh_first; struct rd_ka\ * fka_op_s * *tqh_last; } tmpq = { (((void *)0)), &(tmpq).tqh_first }; LA 15,184(0,13) STG 15,192(0,13) * setting 8 bytes to 0x00 XC 184(8,13),184(13) * *** rd_kafka_op_t *rko, *next; * *** rd_kafka_t *rk = rkq->rkq_rk; LG 5,136(0,7) ; offset of rkq_rk in rd_kafka_q_s * *** rd_kafka_q_t *fwdq; * *** struct timespec timeout_tspec; * *** * *** mtx_lock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_304 ; mtx_lock @@gen_label532 DS 0H BALR 14,15 @@gen_label533 DS 0H * *** if ((fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 7,200(0,13) XC 208(8,13),208(13) LA 1,200(0,13) LG 15,@lit_1466_305 ; rd_kafka_q_fwd_get @@gen_label534 DS 0H BALR 14,15 @@gen_label535 DS 0H LGR 6,15 LTGR 15,6 BZ @L797 * *** * *** * *** mtx_unlock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_306 ; mtx_unlock @@gen_label537 DS 0H BALR 14,15 @@gen_label538 DS 0H * *** cnt = rd_kafka_q_serve_rkmessages(fwdq, timeout_ms, * *** rkmessages, rkmessages_size); STG 6,200(0,13) LGFR 15,3 STG 15,208(0,13) STG 4,216(0,13) LG 15,24(0,9) ; rkmessages_size STG 15,224(0,13) LA 1,200(0,13) LG 15,@lit_1466_307 ; rd_kafka_q_serve_rkmessages @@gen_label539 DS 0H BALR 14,15 @@gen_label540 DS 0H LR 2,15 ; cnt * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 6,200(0,13) XC 208(8,13),208(13) LA 1,200(0,13) LG 15,@lit_1466_308 ; rd_kafka_q_destroy0 @@gen_label541 DS 0H BALR 14,15 @@gen_label542 DS 0H * *** return cnt; LGFR 15,2 B @ret_lab_1466 DS 0D @FRAMESIZE_1466 DC F'240' @lit_1466_304 DC AD(mtx_lock) @lit_1466_305 DC AD(rd_kafka_q_fwd_get) @lit_1466_306 DC AD(mtx_unlock) @lit_1466_307 DC AD(rd_kafka_q_serve_rkmessages) @lit_1466_308 DC AD(rd_kafka_q_destroy0) @lit_1466_310 DC AD(rd_kafka_app_poll_blocking) @lit_1466_311 DC AD(rd_timeout_init_timespec) @lit_1466_312 DC Q(rd_kafka_yield_thread) @lit_1466_314 DC AD(rd_kafka_q_check_yield) @lit_1466_315 DC AD(cnd_timedwait_abs) @lit_1466_316 DC AD(rd_kafka_q_mark_served) @lit_1466_318 DC AD(rd_kafka_q_deq0) @lit_1466_320 DC AD(rd_kafka_op_version_outdated) @lit_1466_322 DC AD(rd_kafka_purge_outdated_messages) @lit_1466_323 DC AD(rd_kafka_op_destroy) @lit_1466_324 DC AD(rd_kafka_poll_cb) @lit_1466_326 DC AD(rd_kafka_op_offset_store) @lit_1466_328 DC AD(rd_kafka_message_get) @lit_1466_330 DC AD(rd_kafka_app_polled) * *** } @L797 DS 0H * *** mtx_unlock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_306 ; mtx_unlock @@gen_label543 DS 0H BALR 14,15 @@gen_label544 DS 0H * *** * *** if (timeout_ms) LTR 3,3 BZ @L798 * *** rd_kafka_app_poll_blocking(rk); STG 5,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_310 ; rd_kafka_app_poll_blocking @@gen_label546 DS 0H BALR 14,15 @@gen_label547 DS 0H @L798 DS 0H * *** * *** rd_timeout_init_timespec(&timeout_tspec, timeout_ms); LA 15,168(0,13) STG 15,200(0,13) LGFR 15,3 STG 15,208(0,13) LA 1,200(0,13) LG 15,@lit_1466_311 ; rd_timeout_init_timespec @@gen_label548 DS 0H BALR 14,15 @@gen_label549 DS 0H * *** * *** rd_kafka_yield_thread = 0; LLGF 15,@lit_1466_312 ; rd_kafka_yield_thread LA 15,0(15,8) MVHI 0(15),0 ; rd_kafka_yield_thread * *** while (cnt < rkmessages_size) { B @L802 @L801 DS 0H * *** rd_kafka_op_res_t res; * *** * *** mtx_lock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_304 ; mtx_lock @@gen_label550 DS 0H BALR 14,15 @@gen_label551 DS 0H * *** * *** while (!(rko = ((&rkq->rkq_q)->tqh_first)) && * *** ; @L806 DS 0H LG 3,96(0,7) ; offset of rkq_q in rd_kafka_q_s LTGR 15,3 BNZ @L807 * *** !rd_kafka_q_check_yield(rkq) && STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_314 ; rd_kafka_q_check_yield @@gen_label553 DS 0H BALR 14,15 @@gen_label554 DS 0H NILF 15,X'000000FF' LTR 15,15 BNZ @L807 * *** cnd_timedwait_abs(&rkq->rkq_cond, &rkq-\ * >rkq_lock, * *** &timeout_tspec) == 0) LA 15,40(0,7) STG 15,200(0,13) STG 7,208(0,13) LA 15,168(0,13) STG 15,216(0,13) LA 1,200(0,13) LG 15,@lit_1466_315 ; cnd_timedwait_abs @@gen_label556 DS 0H BALR 14,15 @@gen_label557 DS 0H LTR 15,15 BE @L806 @L807 DS 0H * *** * *** rd_kafka_q_mark_served(rkq); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_316 ; rd_kafka_q_mark_served @@gen_label559 DS 0H BALR 14,15 @@gen_label560 DS 0H * *** * *** if (!rko) { LTGR 15,3 BNZ @L808 * *** mtx_unlock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_306 ; mtx_unlock @@gen_label562 DS 0H BALR 14,15 @@gen_label563 DS 0H * *** break; B @L799 * *** } @L808 DS 0H * *** * *** rd_kafka_q_deq0(rkq, rko); STG 7,200(0,13) STG 3,208(0,13) LA 1,200(0,13) LG 15,@lit_1466_318 ; rd_kafka_q_deq0 @@gen_label564 DS 0H BALR 14,15 @@gen_label565 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 7,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_306 ; mtx_unlock @@gen_label566 DS 0H BALR 14,15 @@gen_label567 DS 0H * *** * *** if (rd_kafka_op_version_outdated(rko, 0)) { STG 3,200(0,13) XC 208(8,13),208(13) LA 1,200(0,13) LG 15,@lit_1466_320 ; rd_kafka_op_version_outdated @@gen_label568 DS 0H BALR 14,15 @@gen_label569 DS 0H LTR 15,15 BZ @L809 * *** * *** do { (rko)->rko_link .tqe_next = (((v\ * oid *)0)); (rko)->rko_link .tqe_prev = (&tmpq)->tqh_last; *(&tmpq)->\ * tqh_last = (rko); (&tmpq)->tqh_last = &(rko)->rko_link .tqe_next; } \ * while ( 0); @L810 DS 0H LGHI 15,0 ; 0 STG 15,0(0,3) ; rko LG 15,192(0,13) ; offset of tqh_last in 0000157 STG 15,8(0,3) ; offset of tqe_prev in 0000055 LG 15,192(0,13) ; offset of tqh_last in 0000157 STG 3,0(0,15) STG 3,192(0,13) ; offset of tqh_last in 0000157 * *** continue; B @L802 * *** } @L809 DS 0H * *** * *** if (((rko->rko_type == RD_KAFKA_OP_BARRIER))) \ * { CHSI 16(3),50 BNE @L813 * *** cnt = (unsigned int)rd_kafka_purge_out\ * dated_messages( * *** rko->rko_version, * *** rkmessages, * *** cnt); LGF 15,28(0,3) STG 15,200(0,13) STG 4,208(0,13) LLGFR 15,2 STG 15,216(0,13) LA 1,200(0,13) LG 15,@lit_1466_322 ; rd_kafka_purge_outdated_messages @@gen_label572 DS 0H BALR 14,15 @@gen_label573 DS 0H LR 2,15 ; cnt * *** rd_kafka_op_destroy(rko); STG 3,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_323 ; rd_kafka_op_destroy @@gen_label574 DS 0H BALR 14,15 @@gen_label575 DS 0H * *** continue; B @L802 * *** } @L813 DS 0H * *** * *** * *** res = rd_kafka_poll_cb(rk, rkq, rko, * *** RD_KAFKA_Q_CB_RETURN, (\ * (void *)0)); STG 5,200(0,13) STG 7,208(0,13) STG 3,216(0,13) MVGHI 224(13),2 XC 232(8,13),232(13) LA 1,200(0,13) LG 15,@lit_1466_324 ; rd_kafka_poll_cb @@gen_label576 DS 0H BALR 14,15 @@gen_label577 DS 0H * *** if (res == RD_KAFKA_OP_RES_KEEP || CHI 15,2 BE @L802 * *** res == RD_KAFKA_OP_RES_HANDLED) { CHI 15,1 BNE @L814 @L815 DS 0H * *** * *** continue; B @L802 * *** } else if (((res == RD_KAFKA_OP_RES_YIELD || r\ * d_kafka_yield_thread))) { @L814 DS 0H CHI 15,3 BE @L799 LLGF 15,@lit_1466_312 ; rd_kafka_yield_thread LT 15,0(15,8) ; rd_kafka_yield_thread BZ @L819 @L818 DS 0H * *** * *** * *** break; B @L799 * *** } * *** do {} while (0); @L819 DS 0H * *** * *** * *** if (!rko->rko_err && rko->rko_type == RD_KAFKA_OP_FETCH)\ * { LT 15,32(0,3) ; offset of rko_err in rd_kafka_op_s BNZ @L822 CHSI 16(3),1 BNE @L822 * *** rd_kafka_op_offset_store(rk, rko); STG 5,200(0,13) STG 3,208(0,13) LA 1,200(0,13) LG 15,@lit_1466_326 ; rd_kafka_op_offset_store @@gen_label584 DS 0H BALR 14,15 @@gen_label585 DS 0H * *** * *** * *** * *** if (((((rko)->rko_type == RD_KAFKA_OP_\ * FETCH && !(rko)->rko_err && ((rko)->rko_u.fetch.rkm.rkm_flags & 0x80\ * 000))))) { CHSI 16(3),1 BNE @L822 LT 15,32(0,3) ; offset of rko_err in rd_kafka_op_s BNZ @L822 TM 209(3),8 BZ @L822 * *** rd_kafka_op_destroy(rko); STG 3,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_323 ; rd_kafka_op_destroy @@gen_label589 DS 0H BALR 14,15 @@gen_label590 DS 0H * *** continue; B @L802 * *** } * *** } @L822 DS 0H * *** * *** * *** rkmessages[cnt++] = rd_kafka_message_get(rko); LR 15,2 AHI 2,1 LLGFR 15,15 SLLG 6,15,3(0) ; *0x8 STG 3,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_328 ; rd_kafka_message_get @@gen_label591 DS 0H BALR 14,15 @@gen_label592 DS 0H STG 15,0(6,4) * *** } @L800 DS 0H @L802 DS 0H LLGFR 15,2 CLG 15,24(0,9) BL @L801 @L799 DS 0H * *** * *** * *** next = ((&tmpq)->tqh_first); LG 3,184(0,13) * *** while (next) { B @L827 @L826 DS 0H * *** rko = next; LGR 15,3 * *** next = ((next)->rko_link .tqe_next); LG 3,0(0,3) ; next * *** rd_kafka_op_destroy(rko); STG 15,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_323 ; rd_kafka_op_destroy @@gen_label594 DS 0H BALR 14,15 @@gen_label595 DS 0H * *** } @L827 DS 0H LTGR 15,3 BNZ @L826 * *** * *** rd_kafka_app_polled(rk); STG 5,200(0,13) LA 1,200(0,13) LG 15,@lit_1466_330 ; rd_kafka_app_polled @@gen_label597 DS 0H BALR 14,15 @@gen_label598 DS 0H * *** * *** return cnt; LGFR 15,2 * *** } @ret_lab_1466 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_serve_rkmessages" * (FUNCTION #1466) * @AUTO#rd_kafka_q_serve_rkmessages DSECT DS XL168 rd_kafka_q_serve_rkmessages#res#2 DS 1F ; res ORG @AUTO#rd_kafka_q_serve_rkmessages+168 rd_kafka_q_serve_rkmessages#timeout_tspec#0 DS 16XL1 ; timeout_tspec ORG @AUTO#rd_kafka_q_serve_rkmessages+168 rd_kafka_q_serve_rkmessages#cnt#0 DS 1F ; cnt ORG @AUTO#rd_kafka_q_serve_rkmessages+184 rd_kafka_q_serve_rkmessages#tmpq#0 DS 16XL1 ; tmpq * @CODE CSECT * * * * ....... start of rd_kafka_queue_destroy rd_kafka_queue_destroy ALIAS X'99846D92818692816D98A485A4856D8485A2A399* 96A8' @LNAME577 DS 0H DC X'00000016' DC C'rd_kafka_queue_destroy' DC X'00' rd_kafka_queue_destroy DCCPRLG CINDEX=577,BASER=12,FRAME=184,ENTRY=YES,* ARCH=ZARCH,LNAMEADDR=@LNAME577 * ******* End of Prologue * * * *** if (rkqu->rkqu_is_owner) LG 2,0(0,1) ; rkqu LT 15,16(0,2) ; offset of rkqu_is_owner in rd_kafka_queue_* s BZ @L828 * *** rd_kafka_q_destroy_owner(rkqu->rkqu_q); LG 15,0(0,2) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_577_332 ; rd_kafka_q_destroy_owner @@gen_label600 DS 0H BALR 14,15 @@gen_label601 DS 0H B @L829 DS 0D @FRAMESIZE_577 DC F'184' @lit_577_332 DC AD(rd_kafka_q_destroy_owner) @lit_577_333 DC AD(rd_kafka_q_destroy0) @lit_577_334 DC AD(rd_free) * *** else @L828 DS 0H * *** rd_kafka_q_destroy0(rkqu->rkqu_q, 0 ); LG 15,0(0,2) STG 15,168(0,13) XC 176(8,13),176(13) LA 1,168(0,13) LG 15,@lit_577_333 ; rd_kafka_q_destroy0 @@gen_label602 DS 0H BALR 14,15 @@gen_label603 DS 0H @L829 DS 0H * *** rd_free(rkqu); STG 2,168(0,13) LA 1,168(0,13) LG 15,@lit_577_334 ; rd_free @@gen_label604 DS 0H BALR 14,15 @@gen_label605 DS 0H * *** } @ret_lab_577 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_destroy" * (FUNCTION #577) * @AUTO#rd_kafka_queue_destroy DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_new0 rd_kafka_queue_new0 ALIAS X'99846D92818692816D98A485A4856D9585A6F0' @LNAME1946 DS 0H DC X'00000013' DC C'rd_kafka_queue_new0' DC X'00' rd_kafka_queue_new0 DCCPRLG CINDEX=1946,BASER=12,FRAME=192,ENTRY=YES,AR* CH=ZARCH,LNAMEADDR=@LNAME1946 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_queue_t *rkqu; * *** * *** rkqu = rd_calloc(1, sizeof(*rkqu)); MVGHI 176(13),1 MVGHI 184(13),24 LA 1,176(0,13) LG 15,@lit_1946_336 ; rd_calloc @@gen_label606 DS 0H BALR 14,15 @@gen_label607 DS 0H LGR 2,15 * *** * *** rkqu->rkqu_q = rkq; LG 1,8(0,3) ; rkq STG 1,0(0,2) ; rkqu * *** rd_kafka_q_keep(rkq); STG 1,176(0,13) LA 1,176(0,13) LG 15,@lit_1946_337 ; rd_kafka_q_keep @@gen_label608 DS 0H BALR 14,15 @@gen_label609 DS 0H * *** * *** rkqu->rkqu_rk = rk; LG 15,0(0,3) ; rk STG 15,8(0,2) ; offset of rkqu_rk in rd_kafka_queue_s * *** * *** return rkqu; LGR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1946 DC F'192' @lit_1946_336 DC AD(rd_calloc) @lit_1946_337 DC AD(rd_kafka_q_keep) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_new0" * (FUNCTION #1946) * @AUTO#rd_kafka_queue_new0 DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_new rd_kafka_queue_new ALIAS X'99846D92818692816D98A485A4856D9585A6' @LNAME576 DS 0H DC X'00000012' DC C'rd_kafka_queue_new' DC X'00' rd_kafka_queue_new DCCPRLG CINDEX=576,BASER=12,FRAME=200,ENTRY=YES,ARCH* =ZARCH,LNAMEADDR=@LNAME576 LGR 3,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_q_t *rkq; * *** rd_kafka_queue_t *rkqu; * *** * *** rkq = rd_kafka_q_new0(rk,__FUNCTION__,701); LG 15,0(0,3) ; rk STG 15,176(0,13) LG 15,@lit_576_339 LA 15,482(0,15) STG 15,184(0,13) MVGHI 192(13),701 LA 1,176(0,13) LG 15,@lit_576_340 ; rd_kafka_q_new0 @@gen_label610 DS 0H BALR 14,15 @@gen_label611 DS 0H LGR 2,15 * *** rkqu = rd_kafka_queue_new0(rk, rkq); LG 1,0(0,3) ; rk STMG 1,2,176(13) LA 1,176(0,13) LG 15,@lit_576_341 ; rd_kafka_queue_new0 @@gen_label612 DS 0H BALR 14,15 @@gen_label613 DS 0H LGR 3,15 * *** rd_kafka_q_destroy0(rkq, 0 ); STG 2,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_576_342 ; rd_kafka_q_destroy0 @@gen_label614 DS 0H BALR 14,15 @@gen_label615 DS 0H * *** * *** rkqu->rkqu_is_owner = 1; MVHI 16(3),1 ; offset of rkqu_is_owner in rd_kafka_queue_* s * *** return rkqu; LGR 15,3 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_576 DC F'200' @lit_576_340 DC AD(rd_kafka_q_new0) @lit_576_339 DC AD(@DATA) @lit_576_341 DC AD(rd_kafka_queue_new0) @lit_576_342 DC AD(rd_kafka_q_destroy0) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_new" * (FUNCTION #576) * @AUTO#rd_kafka_queue_new DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_get_main rd_kafka_queue_get_main ALIAS X'99846D92818692816D98A485A4856D8785A36D9* 4818995' @LNAME578 DS 0H DC X'00000017' DC C'rd_kafka_queue_get_main' DC X'00' rd_kafka_queue_get_main DCCPRLG CINDEX=578,BASER=12,FRAME=184,ENTRY=YES* ,ARCH=ZARCH,LNAMEADDR=@LNAME578 * ******* End of Prologue * * * *** return rd_kafka_queue_new0(rk, rk->rk_rep); LG 15,0(0,1) ; rk STG 15,168(0,13) LG 15,0(0,1) ; rk LG 15,0(0,15) STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_578_344 ; rd_kafka_queue_new0 @@gen_label616 DS 0H BALR 14,15 @@gen_label617 DS 0H * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_578 DC F'184' @lit_578_344 DC AD(rd_kafka_queue_new0) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_get_main" * (FUNCTION #578) * @AUTO#rd_kafka_queue_get_main DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_get_consumer rd_kafka_queue_get_consumer ALIAS X'99846D92818692816D98A485A4856D8785A* 36D839695A2A4948599' @LNAME579 DS 0H DC X'0000001B' DC C'rd_kafka_queue_get_consumer' DC X'00' rd_kafka_queue_get_consumer DCCPRLG CINDEX=579,BASER=12,FRAME=184,ENTRY* =YES,ARCH=ZARCH,LNAMEADDR=@LNAME579 * ******* End of Prologue * * * *** if (!rk->rk_cgrp) LG 15,0(0,1) ; rk LTG 1,520(0,15) ; offset of rk_cgrp in rd_kafka_s BNZ @L830 * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_579 DS 0D @FRAMESIZE_579 DC F'184' @lit_579_347 DC AD(rd_kafka_queue_new0) @L830 DS 0H * *** return rd_kafka_queue_new0(rk, rk->rk_cgrp->rkcg_q); STG 15,168(0,13) LG 15,520(0,15) ; offset of rk_cgrp in rd_kafka_s LG 15,72(0,15) STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_579_347 ; rd_kafka_queue_new0 @@gen_label619 DS 0H BALR 14,15 @@gen_label620 DS 0H * *** } @ret_lab_579 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_get_consumer" * (FUNCTION #579) * @AUTO#rd_kafka_queue_get_consumer DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_get_partition rd_kafka_queue_get_partition ALIAS X'99846D92818692816D98A485A4856D8785* A36D978199A389A3899695' @LNAME580 DS 0H DC X'0000001C' DC C'rd_kafka_queue_get_partition' DC X'00' rd_kafka_queue_get_partition DCCPRLG CINDEX=580,BASER=12,FRAME=216,ENTR* Y=YES,ARCH=ZARCH,LNAMEADDR=@LNAME580 * ******* End of Prologue * * LG 2,0(0,1) ; rk * *** rd_kafka_toppar_t *rktp; * *** rd_kafka_queue_t *result; * *** * *** if (rk->rk_type == RD_KAFKA_PRODUCER) CHSI 2520(2),0 BNE @L831 * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_580 DS 0D @FRAMESIZE_580 DC F'216' @lit_580_350 DC AD(rd_kafka_toppar_get2) @lit_580_352 DC AD(rd_kafka_queue_new0) @lit_580_353 DC AD(rd_refcnt_sub0) @lit_580_354 DC AD(rd_kafka_toppar_destroy_final) @L831 DS 0H * *** * *** rktp = rd_kafka_toppar_get2(rk, topic, * *** partition, * *** 0, * *** 1 ); STG 2,176(0,13) LG 15,8(0,1) ; topic STG 15,184(0,13) LGF 15,20(0,1) ; partition STG 15,192(0,13) XC 200(8,13),200(13) MVGHI 208(13),1 LA 1,176(0,13) LG 15,@lit_580_350 ; rd_kafka_toppar_get2 @@gen_label622 DS 0H BALR 14,15 @@gen_label623 DS 0H LGR 3,15 * *** * *** if (!rktp) LTGR 15,3 BNZ @L832 * *** return ((void *)0); LGHI 15,0 ; 0 B @ret_lab_580 @L832 DS 0H * *** * *** result = rd_kafka_queue_new0(rk, rktp->rktp_fetchq); STG 2,176(0,13) LG 15,312(0,3) STG 15,184(0,13) LA 1,176(0,13) LG 15,@lit_580_352 ; rd_kafka_queue_new0 @@gen_label625 DS 0H BALR 14,15 @@gen_label626 DS 0H LGR 2,15 * *** do { rd_kafka_toppar_t *_RKTP = (rktp); if (((rd_refcn\ * t_sub0(&_RKTP->rktp_refcnt) == 0))) rd_kafka_toppar_destroy_final(_R\ * KTP); } while (0); @L833 DS 0H LA 15,144(0,3) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_580_353 ; rd_refcnt_sub0 @@gen_label627 DS 0H BALR 14,15 @@gen_label628 DS 0H LTR 15,15 BNE @L836 STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_580_354 ; rd_kafka_toppar_destroy_final @@gen_label630 DS 0H BALR 14,15 @@gen_label631 DS 0H @L836 DS 0H * *** * *** return result; LGR 15,2 * *** } @ret_lab_580 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_get_partition" * (FUNCTION #580) * @AUTO#rd_kafka_queue_get_partition DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_get_background rd_kafka_queue_get_background ALIAS X'99846D92818692816D98A485A4856D878* 5A36D82818392879996A49584' @LNAME581 DS 0H DC X'0000001D' DC C'rd_kafka_queue_get_background' DC X'00' rd_kafka_queue_get_background DCCPRLG CINDEX=581,BASER=12,FRAME=184,ENT* RY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME581 * ******* End of Prologue * * * *** if (rk->rk_background.q) LG 15,0(0,1) ; rk LGHI 1,4344 ; 4344 LTG 2,0(1,15) ; offset of rk_background in rd_kafka_s BZ @L837 * *** return rd_kafka_queue_new0(rk, rk->rk_backgrou\ * nd.q); STG 15,168(0,13) LG 15,0(1,15) STG 15,176(0,13) LA 1,168(0,13) LG 15,@lit_581_358 ; rd_kafka_queue_new0 @@gen_label633 DS 0H BALR 14,15 @@gen_label634 DS 0H B @ret_lab_581 DS 0D @FRAMESIZE_581 DC F'184' @lit_581_358 DC AD(rd_kafka_queue_new0) * *** else @L837 DS 0H * *** return ((void *)0); LGHI 15,0 ; 0 * *** } @ret_lab_581 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_get_background" * (FUNCTION #581) * @AUTO#rd_kafka_queue_get_background DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_set_log_queue rd_kafka_set_log_queue ALIAS X'99846D92818692816DA285A36D9396876D98A485* A485' @LNAME583 DS 0H DC X'00000016' DC C'rd_kafka_set_log_queue' DC X'00' rd_kafka_set_log_queue DCCPRLG CINDEX=583,BASER=12,FRAME=208,ENTRY=YES,* ARCH=ZARCH,LNAMEADDR=@LNAME583 * ******* End of Prologue * * * *** rd_kafka_q_t *rkq; * *** if (!rkqu) LG 15,8(0,1) ; rkqu LTGR 2,15 BNZ @L839 * *** rkq = rk->rk_rep; LG 15,0(0,1) ; rk LG 15,0(0,15) ; rk B @L840 DS 0D @FRAMESIZE_583 DC F'208' @lit_583_361 DC AD(rd_kafka_q_fwd_set0) * *** else @L839 DS 0H * *** rkq = rkqu->rkqu_q; LG 15,0(0,15) ; rkqu @L840 DS 0H * *** rd_kafka_q_fwd_set0(rk->rk_logq,rkq,1 , 0 ); LG 1,0(0,1) ; rk LG 1,2264(0,1) STG 1,176(0,13) STG 15,184(0,13) MVGHI 192(13),1 XC 200(8,13),200(13) LA 1,176(0,13) LG 15,@lit_583_361 ; rd_kafka_q_fwd_set0 @@gen_label636 DS 0H BALR 14,15 @@gen_label637 DS 0H * *** return RD_KAFKA_RESP_ERR_NO_ERROR; LGHI 15,0 ; 0 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_set_log_queue" * (FUNCTION #583) * @AUTO#rd_kafka_set_log_queue DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_forward rd_kafka_queue_forward ALIAS X'99846D92818692816D98A485A4856D869699A681* 9984' @LNAME582 DS 0H DC X'00000016' DC C'rd_kafka_queue_forward' DC X'00' rd_kafka_queue_forward DCCPRLG CINDEX=582,BASER=12,FRAME=200,ENTRY=YES,* ARCH=ZARCH,LNAMEADDR=@LNAME582 * ******* End of Prologue * * * *** rd_kafka_q_fwd_set0(src->rkqu_q, dst ? dst->rkqu_q : (\ * (void *)0), * *** 1, * *** 1 ); LG 15,8(0,1) ; dst LTGR 2,15 BZ @L841 LG 15,0(0,15) ; dst B @L842 DS 0D @FRAMESIZE_582 DC F'200' @lit_582_365 DC AD(rd_kafka_q_fwd_set0) @L841 DS 0H LGHI 15,0 ; 0 @L842 DS 0H LG 1,0(0,1) ; src LG 1,0(0,1) STG 1,168(0,13) STG 15,176(0,13) MVGHI 184(13),1 MVGHI 192(13),1 LA 1,168(0,13) LG 15,@lit_582_365 ; rd_kafka_q_fwd_set0 @@gen_label639 DS 0H BALR 14,15 @@gen_label640 DS 0H * *** } @ret_lab_582 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_forward" * (FUNCTION #582) * @AUTO#rd_kafka_queue_forward DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_length rd_kafka_queue_length ALIAS X'99846D92818692816D98A485A4856D93859587A38* 8' @LNAME584 DS 0H DC X'00000015' DC C'rd_kafka_queue_length' DC X'00' rd_kafka_queue_length DCCPRLG CINDEX=584,BASER=12,FRAME=176,ENTRY=YES,A* RCH=ZARCH,LNAMEADDR=@LNAME584 * ******* End of Prologue * * * *** return (size_t)rd_kafka_q_len(rkqu->rkqu_q); LG 15,0(0,1) ; rkqu LG 15,0(0,15) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_584_367 ; rd_kafka_q_len @@gen_label641 DS 0H BALR 14,15 @@gen_label642 DS 0H LGFR 15,15 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_584 DC F'176' @lit_584_367 DC AD(rd_kafka_q_len) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_length" * (FUNCTION #584) * @AUTO#rd_kafka_queue_length DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_io_event_enable rd_kafka_q_io_event_enable ALIAS X'99846D92818692816D986D89966D85A58595* A36D859581829385' @LNAME1471 DS 0H DC X'0000001A' DC C'rd_kafka_q_io_event_enable' DC X'00' rd_kafka_q_io_event_enable DCCPRLG CINDEX=1471,BASER=12,FRAME=184,ENTRY* =YES,ARCH=ZARCH,LNAMEADDR=@LNAME1471 LGR 6,1 ; ptr to parm area * ******* End of Prologue * * * *** struct rd_kafka_q_io *qio = ((void *)0); LG 3,0(0,6) ; rkq L 4,12(0,6) ; fd LG 5,24(0,6) ; size LGHI 7,0 ; 0 LGR 2,7 ; qio * *** * *** if (fd != -1) { CHI 4,-1 BE @L843 * *** qio = rd_malloc(sizeof(*qio) + size); LGR 15,5 AGHI 15,48 STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1471_370 ; rd_malloc @@gen_label644 DS 0H BALR 14,15 @@gen_label645 DS 0H LGR 2,15 ; qio * *** qio->fd = fd; ST 4,0(0,15) ; qio * *** qio->size = size; STG 5,16(0,15) ; offset of size in rd_kafka_q_io * *** qio->payload = (void *)(qio+1); LA 1,48(0,15) STG 1,8(0,15) ; offset of payload in rd_kafka_q_io * *** qio->sent = 0; MVI 24(15),0 ; offset of sent in rd_kafka_q_io * *** qio->event_cb = ((void *)0); STG 7,32(0,15) ; offset of event_cb in rd_kafka_q_io * *** qio->event_cb_opaque = ((void *)0); STG 7,40(0,15) ; offset of event_cb_opaque in rd_kafka_q_io * *** __memcpy(qio->payload,payload,size); LG 1,16(0,6) LG 6,8(0,15) LTGR 15,5 BZ @@gen_label648 AGHI 15,-1 SRAG 5,15,8(0) LTGR 5,5 BZ @@gen_label647 @@gen_label646 DS 0H MVC 0(256,6),0(1) LA 6,256(0,6) LA 1,256(0,1) BCTG 5,@@gen_label646 @@gen_label647 DS 0H EX 15,@lit_1471_373 @@gen_label648 DS 0H * *** } @L843 DS 0H * *** * *** mtx_lock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1471_374 ; mtx_lock @@gen_label649 DS 0H BALR 14,15 @@gen_label650 DS 0H * *** if (rkq->rkq_qio) { LTG 15,144(0,3) ; offset of rkq_qio in rd_kafka_q_s BZ @L844 * *** rd_free(rkq->rkq_qio); LG 15,144(0,3) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1471_375 ; rd_free @@gen_label652 DS 0H BALR 14,15 @@gen_label653 DS 0H * *** rkq->rkq_qio = ((void *)0); LGHI 15,0 ; 0 STG 15,144(0,3) ; offset of rkq_qio in rd_kafka_q_s * *** } @L844 DS 0H * *** * *** if (fd != -1) { CHI 4,-1 BE @L845 * *** rkq->rkq_qio = qio; STG 2,144(0,3) ; offset of rkq_qio in rd_kafka_q_s * *** } @L845 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1471_377 ; mtx_unlock @@gen_label655 DS 0H BALR 14,15 @@gen_label656 DS 0H * *** * *** } @ret_lab_1471 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1471 DC F'184' @lit_1471_370 DC AD(rd_malloc) @lit_1471_373 MVC 0(1,6),0(1) @lit_1471_374 DC AD(mtx_lock) @lit_1471_375 DC AD(rd_free) @lit_1471_377 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_io_event_enable" * (FUNCTION #1471) * @AUTO#rd_kafka_q_io_event_enable DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_io_event_enable rd_kafka_queue_io_event_enable ALIAS X'99846D92818692816D98A485A4856D89* 966D85A58595A36D859581829385' @LNAME585 DS 0H DC X'0000001E' DC C'rd_kafka_queue_io_event_enable' DC X'00' rd_kafka_queue_io_event_enable DCCPRLG CINDEX=585,BASER=12,FRAME=200,EN* TRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME585 * ******* End of Prologue * * * *** rd_kafka_q_io_event_enable(rkqu->rkqu_q, fd, payload, \ * size); LG 15,0(0,1) ; rkqu LG 15,0(0,15) STG 15,168(0,13) LGF 15,12(0,1) ; fd STG 15,176(0,13) LG 15,16(0,1) ; payload STG 15,184(0,13) LG 15,24(0,1) ; size STG 15,192(0,13) LA 1,168(0,13) LG 15,@lit_585_379 ; rd_kafka_q_io_event_enable @@gen_label657 DS 0H BALR 14,15 @@gen_label658 DS 0H * *** } @ret_lab_585 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_585 DC F'200' @lit_585_379 DC AD(rd_kafka_q_io_event_enable) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_io_event_enable" * (FUNCTION #585) * @AUTO#rd_kafka_queue_io_event_enable DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_yield rd_kafka_queue_yield ALIAS X'99846D92818692816D98A485A4856DA889859384' @LNAME587 DS 0H DC X'00000014' DC C'rd_kafka_queue_yield' DC X'00' rd_kafka_queue_yield DCCPRLG CINDEX=587,BASER=12,FRAME=176,ENTRY=YES,AR* CH=ZARCH,LNAMEADDR=@LNAME587 * ******* End of Prologue * * * *** rd_kafka_q_yield(rkqu->rkqu_q); LG 15,0(0,1) ; rkqu LG 15,0(0,15) STG 15,168(0,13) LA 1,168(0,13) LG 15,@lit_587_381 ; rd_kafka_q_yield @@gen_label659 DS 0H BALR 14,15 @@gen_label660 DS 0H * *** } @ret_lab_587 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_587 DC F'176' @lit_587_381 DC AD(rd_kafka_q_yield) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_yield" * (FUNCTION #587) * @AUTO#rd_kafka_queue_yield DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_cb_event_enable rd_kafka_q_cb_event_enable ALIAS X'99846D92818692816D986D83826D85A58595* A36D859581829385' @LNAME1947 DS 0H DC X'0000001A' DC C'rd_kafka_q_cb_event_enable' DC X'00' rd_kafka_q_cb_event_enable DCCPRLG CINDEX=1947,BASER=12,FRAME=184,ENTRY* =YES,ARCH=ZARCH,LNAMEADDR=@LNAME1947 LGR 5,1 ; ptr to parm area * ******* End of Prologue * * * *** struct rd_kafka_q_io *qio = ((void *)0); LMG 3,4,0(5) ; rkq LGHI 6,0 ; 0 LGR 2,6 ; qio * *** * *** if (event_cb) { LTGR 15,4 BZ @L846 * *** qio = rd_malloc(sizeof(*qio)); MVGHI 176(13),48 LA 1,176(0,13) LG 15,@lit_1947_384 ; rd_malloc @@gen_label662 DS 0H BALR 14,15 @@gen_label663 DS 0H LGR 2,15 ; qio * *** qio->fd = -1; MVHI 0(15),-1 ; qio * *** qio->size = 0; MVGHI 16(15),0 ; offset of size in rd_kafka_q_io * *** qio->payload = ((void *)0); STG 6,8(0,15) ; offset of payload in rd_kafka_q_io * *** qio->event_cb = event_cb; STG 4,32(0,15) ; offset of event_cb in rd_kafka_q_io * *** qio->event_cb_opaque = opaque; LG 1,16(0,5) ; opaque STG 1,40(0,15) ; offset of event_cb_opaque in rd_kafka_q_io * *** } @L846 DS 0H * *** * *** mtx_lock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1947_386 ; mtx_lock @@gen_label664 DS 0H BALR 14,15 @@gen_label665 DS 0H * *** if (rkq->rkq_qio) { LTG 15,144(0,3) ; offset of rkq_qio in rd_kafka_q_s BZ @L847 * *** rd_free(rkq->rkq_qio); LG 15,144(0,3) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1947_387 ; rd_free @@gen_label667 DS 0H BALR 14,15 @@gen_label668 DS 0H * *** rkq->rkq_qio = ((void *)0); STG 6,144(0,3) ; offset of rkq_qio in rd_kafka_q_s * *** } @L847 DS 0H * *** * *** if (event_cb) { LTGR 15,4 BZ @L848 * *** rkq->rkq_qio = qio; STG 2,144(0,3) ; offset of rkq_qio in rd_kafka_q_s * *** } @L848 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 3,176(0,13) LA 1,176(0,13) LG 15,@lit_1947_389 ; mtx_unlock @@gen_label670 DS 0H BALR 14,15 @@gen_label671 DS 0H * *** * *** } @ret_lab_1947 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1947 DC F'184' @lit_1947_384 DC AD(rd_malloc) @lit_1947_386 DC AD(mtx_lock) @lit_1947_387 DC AD(rd_free) @lit_1947_389 DC AD(mtx_unlock) DROP 12 * * DSECT for automatic variables in "rd_kafka_q_cb_event_enable" * (FUNCTION #1947) * @AUTO#rd_kafka_q_cb_event_enable DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_queue_cb_event_enable rd_kafka_queue_cb_event_enable ALIAS X'99846D92818692816D98A485A4856D83* 826D85A58595A36D859581829385' @LNAME586 DS 0H DC X'0000001E' DC C'rd_kafka_queue_cb_event_enable' DC X'00' rd_kafka_queue_cb_event_enable DCCPRLG CINDEX=586,BASER=12,FRAME=192,EN* TRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME586 * ******* End of Prologue * * * *** rd_kafka_q_cb_event_enable (rkqu->rkqu_q, event_cb, op\ * aque); LG 15,0(0,1) ; rkqu LG 15,0(0,15) STG 15,168(0,13) LG 15,8(0,1) ; event_cb STG 15,176(0,13) LG 15,16(0,1) ; opaque STG 15,184(0,13) LA 1,168(0,13) LG 15,@lit_586_391 ; rd_kafka_q_cb_event_enable @@gen_label672 DS 0H BALR 14,15 @@gen_label673 DS 0H * *** } @ret_lab_586 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_586 DC F'192' @lit_586_391 DC AD(rd_kafka_q_cb_event_enable) DROP 12 * * DSECT for automatic variables in "rd_kafka_queue_cb_event_enable" * (FUNCTION #586) * @AUTO#rd_kafka_queue_cb_event_enable DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_q_wait_result rd_kafka_q_wait_result ALIAS X'99846D92818692816D986DA68189A36D9985A2A4* 93A3' @LNAME1467 DS 0H DC X'00000016' DC C'rd_kafka_q_wait_result' DC X'00' rd_kafka_q_wait_result DCCPRLG CINDEX=1467,BASER=12,FRAME=200,ENTRY=YES* ,ARCH=ZARCH,LNAMEADDR=@LNAME1467 LGR 2,1 ; ptr to parm area * ******* End of Prologue * * * *** rd_kafka_op_t *rko; * *** rd_kafka_resp_err_t err; * *** * *** rko = rd_kafka_q_pop(rkq, rd_timeout_us(timeout_ms), 0\ * ); LGF 15,12(0,2) ; timeout_ms STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1467_393 ; rd_timeout_us @@gen_label674 DS 0H BALR 14,15 @@gen_label675 DS 0H LG 1,0(0,2) ; rkq STG 1,176(0,13) STG 15,184(0,13) XC 192(8,13),192(13) LA 1,176(0,13) LG 15,@lit_1467_394 ; rd_kafka_q_pop @@gen_label676 DS 0H BALR 14,15 @@gen_label677 DS 0H * *** if (!rko) LTGR 1,15 BNZ @L849 * *** err = RD_KAFKA_RESP_ERR__TIMED_OUT; LHI 2,-185 ; -185 B @L850 DS 0D @FRAMESIZE_1467 DC F'200' @lit_1467_393 DC AD(rd_timeout_us) @lit_1467_394 DC AD(rd_kafka_q_pop) @lit_1467_396 DC AD(rd_kafka_op_destroy) * *** else { @L849 DS 0H * *** err = rko->rko_err; L 2,32(0,15) ; offset of rko_err in rd_kafka_op_s * *** rd_kafka_op_destroy(rko); STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1467_396 ; rd_kafka_op_destroy @@gen_label679 DS 0H BALR 14,15 @@gen_label680 DS 0H * *** } @L850 DS 0H * *** * *** return err; LGFR 15,2 * *** } * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_wait_result" * (FUNCTION #1467) * @AUTO#rd_kafka_q_wait_result DSECT DS XL168 rd_kafka_q_wait_result#err#0 DS 1F ; err * @CODE CSECT * * * * ....... start of rd_kafka_q_apply rd_kafka_q_apply ALIAS X'99846D92818692816D986D81979793A8' @LNAME1468 DS 0H DC X'00000010' DC C'rd_kafka_q_apply' DC X'00' rd_kafka_q_apply DCCPRLG CINDEX=1468,BASER=12,FRAME=200,ENTRY=YES,ARCH=* ZARCH,LNAMEADDR=@LNAME1468 LGR 5,1 ; ptr to parm area * ******* End of Prologue * * LG 4,0(0,5) ; rkq * *** rd_kafka_op_t *rko, *next; * *** rd_kafka_q_t *fwdq; * *** int cnt = 0; LHI 2,0 ; 0 * *** * *** mtx_lock(&rkq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1468_399 ; mtx_lock @@gen_label681 DS 0H BALR 14,15 @@gen_label682 DS 0H * *** if ((fwdq = rd_kafka_q_fwd_get(rkq, 0))) { STG 4,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1468_400 ; rd_kafka_q_fwd_get @@gen_label683 DS 0H BALR 14,15 @@gen_label684 DS 0H LGR 3,15 LTGR 15,3 BZ @L851 * *** mtx_unlock(&rkq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1468_401 ; mtx_unlock @@gen_label686 DS 0H BALR 14,15 @@gen_label687 DS 0H * *** cnt = rd_kafka_q_apply(fwdq, callback, opaque); STG 3,176(0,13) LG 15,8(0,5) ; callback STG 15,184(0,13) LG 15,16(0,5) ; opaque STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1468_402 ; rd_kafka_q_apply @@gen_label688 DS 0H BALR 14,15 @@gen_label689 DS 0H LR 2,15 ; cnt * *** rd_kafka_q_destroy0(fwdq, 0 ); STG 3,176(0,13) XC 184(8,13),184(13) LA 1,176(0,13) LG 15,@lit_1468_403 ; rd_kafka_q_destroy0 @@gen_label690 DS 0H BALR 14,15 @@gen_label691 DS 0H * *** return cnt; LGFR 15,2 B @ret_lab_1468 DS 0D @FRAMESIZE_1468 DC F'200' @lit_1468_399 DC AD(mtx_lock) @lit_1468_400 DC AD(rd_kafka_q_fwd_get) @lit_1468_401 DC AD(mtx_unlock) @lit_1468_402 DC AD(rd_kafka_q_apply) @lit_1468_403 DC AD(rd_kafka_q_destroy0) @lit_1468_404 DC AD(rd_kafka_q_mark_served) * *** } @L851 DS 0H * *** * *** next = ((&rkq->rkq_q)->tqh_first); LG 3,96(0,4) ; offset of rkq_q in rd_kafka_q_s * *** while ((rko = next)) { B @L855 @L854 DS 0H * *** next = ((next)->rko_link .tqe_next); LG 3,0(0,3) ; next * *** cnt += callback(rkq, rko, opaque); STG 4,176(0,13) STG 15,184(0,13) LG 15,16(0,5) ; opaque STG 15,192(0,13) LG 15,8(0,5) ; callback LA 1,176(0,13) @@gen_label692 DS 0H BALR 14,15 @@gen_label693 DS 0H AR 2,15 * *** } @L855 DS 0H LGR 15,3 ; rko LTGR 1,3 BNZ @L854 * *** * *** rd_kafka_q_mark_served(rkq); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1468_404 ; rd_kafka_q_mark_served @@gen_label695 DS 0H BALR 14,15 @@gen_label696 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1468_401 ; mtx_unlock @@gen_label697 DS 0H BALR 14,15 @@gen_label698 DS 0H * *** * *** return cnt; LGFR 15,2 * *** } @ret_lab_1468 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_apply" * (FUNCTION #1468) * @AUTO#rd_kafka_q_apply DSECT DS XL168 rd_kafka_q_apply#cnt#0 DS 1F ; cnt * @CODE CSECT * * * * ....... start of rd_kafka_q_fix_offsets rd_kafka_q_fix_offsets ALIAS X'99846D92818692816D986D8689A76D968686A285* A3A2' @LNAME1469 DS 0H DC X'00000016' DC C'rd_kafka_q_fix_offsets' DC X'00' rd_kafka_q_fix_offsets DCCPRLG CINDEX=1469,BASER=12,FRAME=216,ENTRY=YES* ,ARCH=ZARCH,LNAMEADDR=@LNAME1469 LGR 6,1 ; ptr to parm area * ******* End of Prologue * * LG 5,0(0,6) ; rkq * *** rd_kafka_op_t *rko, *next; * *** int adj_len = 0; LHI 3,0 ; 0 * *** int64_t adj_size = 0; LGHI 4,0 ; 0 * *** * *** do { if (((!(!rkq->rkq_fwdq)))) rd_kafka_crash("C:\\asgkafk\ * a\\librdkafka\\src\\rdkafka_queue.c",931, __FUNCTION__, (((void *)0)\ * ), "assert: " "!rkq->rkq_fwdq"); } while (0); @L856 DS 0H LTG 15,88(0,5) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L859 LG 15,@lit_1469_409 LA 1,210(0,15) STG 1,176(0,13) MVGHI 184(13),931 LG 1,@lit_1469_410 LA 1,502(0,1) STG 1,192(0,13) XC 200(8,13),200(13) LA 15,306(0,15) STG 15,208(0,13) LA 1,176(0,13) LG 15,@lit_1469_411 ; rd_kafka_crash @@gen_label700 DS 0H BALR 14,15 @@gen_label701 DS 0H @L859 DS 0H * *** * *** next = ((&rkq->rkq_q)->tqh_first); LG 2,96(0,5) ; offset of rkq_q in rd_kafka_q_s * *** while ((rko = next)) { B @L863 DS 0D @FRAMESIZE_1469 DC F'216' @lit_1469_411 DC AD(rd_kafka_crash) @lit_1469_410 DC AD(@DATA) @lit_1469_409 DC AD(@strings@) @lit_1469_412 DC AD(rd_kafka_op_destroy) @L862 DS 0H * *** next = ((next)->rko_link .tqe_next); LG 2,0(0,2) ; next * *** * *** if (((rko->rko_type != RD_KAFKA_OP_FETCH))) CHSI 16(15),1 BNE @L863 * *** continue; @L864 DS 0H * *** * *** rko->rko_u.fetch.rkm. rkm_rkmessage.offset += base_offse\ * t; LG 1,176(0,15) AG 1,16(0,6) STG 1,176(0,15) * *** * *** if (rko->rko_u.fetch.rkm. rkm_rkmessage.offset < min_off\ * set && CG 1,8(0,6) BNL @L863 * *** rko->rko_err != RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED) \ * { CHSI 32(15),-170 BE @L863 * *** adj_len++; AHI 3,1 * *** adj_size += rko->rko_len; AGF 4,48(0,15) * *** do { if (((rko)->rko_link .tqe_next) != (((void *)0\ * ))) (rko)->rko_link .tqe_next->rko_link .tqe_prev = (rko)->rko_link \ * .tqe_prev; else (&rkq->rkq_q)->tqh_last = (rko)->rko_link .tqe_prev;\ * *(rko)->rko_link .tqe_prev = (rko)->rko_link .tqe_next; ; } while (\ * 0); @L866 DS 0H LTG 1,0(0,15) ; rko BE @L869 LG 1,0(0,15) ; rko LG 7,8(0,15) ; offset of tqe_prev in 0000055 STG 7,8(0,1) ; offset of tqe_prev in 0000055 B @L870 @L869 DS 0H LG 1,8(0,15) ; offset of tqe_prev in 0000055 STG 1,104(0,5) ; offset of tqh_last in rd_kafka_op_tailq @L870 DS 0H LG 1,8(0,15) ; offset of tqe_prev in 0000055 LG 7,0(0,15) ; rko STG 7,0(0,1) * *** rd_kafka_op_destroy(rko); STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1469_412 ; rd_kafka_op_destroy @@gen_label706 DS 0H BALR 14,15 @@gen_label707 DS 0H * *** continue; * *** } * *** } @L863 DS 0H LGR 15,2 ; rko LTGR 1,2 BNZ @L862 * *** * *** * *** rkq->rkq_qlen -= adj_len; L 15,112(0,5) SR 15,3 ST 15,112(0,5) * *** rkq->rkq_qsize -= adj_size; LG 15,120(0,5) SGR 15,4 STG 15,120(0,5) * *** } @ret_lab_1469 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_fix_offsets" * (FUNCTION #1469) * @AUTO#rd_kafka_q_fix_offsets DSECT DS XL168 rd_kafka_q_fix_offsets#adj_size#0 DS 8XL1 ; adj_size ORG @AUTO#rd_kafka_q_fix_offsets+168 rd_kafka_q_fix_offsets#adj_len#0 DS 1F ; adj_len * @CODE CSECT * * * * ....... start of rd_kafka_q_dump rd_kafka_q_dump ALIAS X'99846D92818692816D986D84A49497' @LNAME1472 DS 0H DC X'0000000F' DC C'rd_kafka_q_dump' DC X'00' rd_kafka_q_dump DCCPRLG CINDEX=1472,BASER=12,FRAME=256,ENTRY=YES,ARCH=Z* ARCH,LNAMEADDR=@LNAME1472 * ******* End of Prologue * * * *** mtx_lock(&rkq->rkq_lock); LMG 3,4,0(1) ; fp STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1472_414 ; mtx_lock @@gen_label709 DS 0H BALR 14,15 @@gen_label710 DS 0H * *** fprintf(fp, "Queue %p \"%s\" (refcnt %d, flags 0x%x, %\ * d ops, " * *** rkq, rkq->rkq_name, rkq->rkq_refcnt, rkq->rkq_\ * flags, * *** rkq->rkq_qlen, rkq->rkq_qsize); STG 3,176(0,13) * *** "%" "lld" " bytes)\n", LG 2,@lit_1472_415 LA 15,330(0,2) STG 15,184(0,13) STG 4,192(0,13) LG 15,168(0,4) STG 15,200(0,13) LGF 15,128(0,4) STG 15,208(0,13) LGF 15,132(0,4) STG 15,216(0,13) LGF 15,112(0,4) STG 15,224(0,13) LG 15,120(0,4) STG 15,232(0,13) LA 1,176(0,13) LG 5,@lit_1472_416 ; fprintf LGR 15,5 @@gen_label711 DS 0H BALR 14,15 @@gen_label712 DS 0H * *** * *** if (rkq->rkq_qio) LTG 15,144(0,4) ; offset of rkq_qio in rd_kafka_q_s BZ @L871 * *** fprintf(fp, " QIO fd %d\n", (int)rkq->rkq_qio-\ * >fd); STG 3,176(0,13) LA 15,390(0,2) STG 15,184(0,13) LG 15,144(0,4) ; offset of rkq_qio in rd_kafka_q_s LGF 15,0(0,15) STG 15,192(0,13) LA 1,176(0,13) LGR 15,5 @@gen_label714 DS 0H BALR 14,15 @@gen_label715 DS 0H @L871 DS 0H * *** if (rkq->rkq_serve) LTG 15,152(0,4) ; offset of rkq_serve in rd_kafka_q_s BZ @L872 * *** fprintf(fp, " Serve callback %p, opaque %p\n", * *** rkq->rkq_serve, rkq->rkq_opaque); STG 3,176(0,13) LA 15,402(0,2) STG 15,184(0,13) LG 15,152(0,4) STG 15,192(0,13) LG 15,160(0,4) STG 15,200(0,13) LA 1,176(0,13) LGR 15,5 @@gen_label717 DS 0H BALR 14,15 @@gen_label718 DS 0H @L872 DS 0H * *** * *** if (rkq->rkq_fwdq) { LTG 15,88(0,4) ; offset of rkq_fwdq in rd_kafka_q_s BZ @L873 * *** fprintf(fp, " Forwarded ->\n"); STG 3,176(0,13) LA 15,434(0,2) STG 15,184(0,13) LA 1,176(0,13) LGR 15,5 @@gen_label720 DS 0H BALR 14,15 @@gen_label721 DS 0H * *** rd_kafka_q_dump(fp, rkq->rkq_fwdq); STG 3,176(0,13) LG 15,88(0,4) STG 15,184(0,13) LA 1,176(0,13) LG 15,@lit_1472_420 ; rd_kafka_q_dump @@gen_label722 DS 0H BALR 14,15 @@gen_label723 DS 0H * *** } else { B @L874 DS 0D @FRAMESIZE_1472 DC F'256' @lit_1472_414 DC AD(mtx_lock) @lit_1472_416 DC AD(fprintf) @lit_1472_415 DC AD(@strings@) @lit_1472_420 DC AD(rd_kafka_q_dump) @lit_1472_422 DC AD(rd_kafka_op2str) @lit_1472_425 DC AD(mtx_unlock) @L873 DS 0H * *** rd_kafka_op_t *rko; * *** * *** if (!(((&rkq->rkq_q)->tqh_first) == (((void *)\ * 0)))) LTG 15,96(0,4) ; offset of rkq_q in rd_kafka_q_s BE @L875 * *** fprintf(fp, " Queued ops:\n"); STG 3,176(0,13) LA 15,450(0,2) STG 15,184(0,13) LA 1,176(0,13) LGR 15,5 @@gen_label725 DS 0H BALR 14,15 @@gen_label726 DS 0H @L875 DS 0H * *** for ((rko) = ((&rkq->rkq_q)->tqh_first); (rko)\ * != (((void *)0)); (rko) = ((rko)->rko_link .tqe_next)) { LG 2,96(0,4) ; offset of rkq_q in rd_kafka_q_s B @L877 @L876 DS 0H * *** fprintf(fp, " %p %s (v%" "d" ", flags\ * 0x%x, " * *** rko, rd_kafka_op2str(rko->rko_\ * type), * *** rko->rko_version, rko->rko_fla\ * gs, * *** rko->rko_prio, rko->rko_len, * *** \ * "-" * *** * *** rko->rko_replyq.q LGF 15,16(0,2) STG 15,176(0,13) LA 1,176(0,13) LG 15,@lit_1472_422 ; rd_kafka_op2str @@gen_label727 DS 0H BALR 14,15 @@gen_label728 DS 0H STG 3,176(0,13) * *** "prio %d, len %" "d" ", source\ * %s, " * *** "replyq %p)\n", LG 1,@lit_1472_415 LA 5,464(0,1) STG 5,184(0,13) STG 2,192(0,13) STG 15,200(0,13) LGF 15,28(0,2) STG 15,208(0,13) LGF 15,24(0,2) STG 15,216(0,13) LGF 15,52(0,2) STG 15,224(0,13) LGF 15,48(0,2) STG 15,232(0,13) * *** * *** * *** * *** \ * , LA 15,530(0,1) STG 15,240(0,13) * *** ); LG 15,64(0,2) STG 15,248(0,13) LA 1,176(0,13) LG 15,@lit_1472_416 ; fprintf @@gen_label729 DS 0H BALR 14,15 @@gen_label730 DS 0H * *** } LG 2,0(0,2) ; rko @L877 DS 0H LTGR 15,2 BNE @L876 * *** } @L874 DS 0H * *** * *** mtx_unlock(&rkq->rkq_lock); STG 4,176(0,13) LA 1,176(0,13) LG 15,@lit_1472_425 ; mtx_unlock @@gen_label732 DS 0H BALR 14,15 @@gen_label733 DS 0H * *** } @ret_lab_1472 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DROP 12 * * DSECT for automatic variables in "rd_kafka_q_dump" * (FUNCTION #1472) * @AUTO#rd_kafka_q_dump DSECT DS XL168 * @CODE CSECT * * * * ....... start of rd_kafka_enq_once_trigger_destroy rd_kafka_enq_once_trigger_destroy ALIAS X'99846D92818692816D8595986D969* 583856DA39989878785996D8485A2A39996A8' @LNAME1478 DS 0H DC X'00000021' DC C'rd_kafka_enq_once_trigger_destro' DC C'y' DC X'00' rd_kafka_enq_once_trigger_destroy DCCPRLG CINDEX=1478,BASER=12,FRAME=20* 0,ENTRY=YES,ARCH=ZARCH,LNAMEADDR=@LNAME1478 * ******* End of Prologue * * * *** rd_kafka_enq_once_t *eonce = ptr; LG 15,0(0,1) ; ptr * *** * *** rd_kafka_enq_once_trigger(eonce, RD_KAFKA_RESP_ERR__DE\ * STROY, "destroy"); STG 15,176(0,13) MVGHI 184(13),-197 LG 15,@lit_1478_427 LA 15,532(0,15) STG 15,192(0,13) LA 1,176(0,13) LG 15,@lit_1478_428 ; rd_kafka_enq_once_trigger @@gen_label734 DS 0H BALR 14,15 @@gen_label735 DS 0H * *** } @ret_lab_1478 DS 0H * * **** Start of Epilogue DCCEPIL * * **** End of Epilogue DS 0D @FRAMESIZE_1478 DC F'200' @lit_1478_428 DC AD(rd_kafka_enq_once_trigger) @lit_1478_427 DC AD(@strings@) DROP 12 * * DSECT for automatic variables in "rd_kafka_enq_once_trigger_destro * y" * (FUNCTION #1478) * @AUTO#rd_kafka_enq_once_trigger_destroy DSECT DS XL168 * @CODE CSECT rd_kafka_yield_thread ALIAS X'99846D92818692816DA8898593846DA3889985818* 4' rd_kafka_yield_thread DXD 1F @@STATIC ALIAS X'7C998492818692816D98A485A48550' @@STATIC DXD 219D * * Non-Re-Entrant Data Section * @DATA CSECT @DATA RMODE ANY @DATA AMODE ANY @@T48F DC X'99846D838193939683' rd.calloc DC 1X'00' @@T493 DC X'99846D948193939683' rd.malloc DC 1X'00' @@T498 DC X'99846D99858193939683' rd.realloc DC 2X'00' @@T49E DC X'99846DA2A39984A497' rd.strdup DC 1X'00' @@T4A3 DC X'99846DA2A3999584A497' rd.strndup DC 2X'00' @@T4AB DC X'99846D9985868395A36DA2A482F0' rd.refcnt.sub0 DC 4X'00' @@T65A DC 4X'00' DC X'0000001A000000000000002200000000' ................ DC X'00000024' .... @@T67D DC X'99846D92818692816D94A287986D8485' rd.kafka.msgq.de DC X'98' q DC 1X'00' @@T704 DC X'99846D92818692816D986D8485A2A399' rd.kafka.q.destr DC X'96A8F0' oy0 DC 1X'00' @@T785 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485A2A39996A8F0' e.destroy0 DC 2X'00' @@T78D DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485936DA296A4998385' e.del.source DC 2X'00' @@T794 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485936DA296A49983856D9985A3' e.del.source.ret DC X'A49995' urn DC 1X'00' @@T79C DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856DA3998987878599' e.trigger DC 1X'00' @@T7A0 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8485A2A39996A8' e.destroy DC 1X'00' @@T7A5 DC X'99846D92818692816D8595986D969583' rd.kafka.enq.onc DC X'856D8489A281829385' e.disable DC 1X'00' @@T7C5 DC X'99846DA394978182A4866D8193939683' rd.tmpabuf.alloc DC X'F0' 0 DC 1X'00' @@T7F9 DC X'99846D92818692816D82A4866DA49784' rd.kafka.buf.upd DC X'81A385' ate DC 1X'00' @@T81A DC X'99846D92818692816D82A4866D868995' rd.kafka.buf.fin DC X'819389A9856D81999981A88395A3' alize.arraycnt DC 2X'00' @@T857 DC X'99846D92818692816D82A4866D839983' rd.kafka.buf.crc DC X'6D899589A3' .init DC 1X'00' @@TA27 DC X'99846D92818692816D83A499996D94A2' rd.kafka.curr.ms DC X'87A26DA2A482' gs.sub DC 2X'00' @@TA73 DC X'99846D92818692816D986D8485A2A399' rd.kafka.q.destr DC X'96A86D8689958193' oy.final DC 2X'00' @@TA7C DC X'99846D92818692816D986D9585A6F0' rd.kafka.q.new0 DC 1X'00' @@TAB9 DC X'99846D92818692816D986DA28599A585' rd.kafka.q.serve DC 2X'00' @@TAD7 DC X'99846D92818692816D98A485A4856D95' rd.kafka.queue.n DC X'85A6' ew DC 2X'00' @@TB0C DC X'99846D92818692816D986D8689A76D96' rd.kafka.q.fix.o DC X'8686A285A3A2' ffsets DC 1X'00' @strings@ DS 0H DC X'C37AE081A2879281869281E093898299' C..asgkafka.libr DC X'849281869281E0A29983E099844B8800' dkafka.src.rd.h. DC X'97009985868395A340A2A48260A98599' p.refcnt.sub.zer DC X'96005A5C7F9985868395A340A2A48260' o....refcnt.sub. DC X'A98599967F00C37AE081A28792818692' zero..C..asgkafk DC X'81E093898299849281869281E0A29983' a.librdkafka.src DC X'E0998492818692816D98A485A4854B88' .rdkafka.queue.h DC X'000081A2A28599A37A40999298606E99' ..assert..rkq..r DC X'92986D9985868395A3406E40F0005A85' kq.refcnt...0..e DC X'96958385606E999296005A8596958385' once..rko..eonce DC X'606E99859793A8984B98000085969583' ..replyq.q..eonc DC X'85606E9985868395A3407E7E40F00000' e..refcnt....0.. DC X'8596958385606E9985868395A3406E40' eonce..refcnt... DC X'F000C37AE081A2879281869281E09389' 0.C..asgkafka.li DC X'8299849281869281E0A29983E0998492' brdkafka.src.rdk DC X'818692816D98A485A4854B8300005A99' afka.queue.c...r DC X'9298606E9992986D86A68498000081A2' kq..rkq.fwdq..as DC X'A28599A37A409985A2405A7E40D9C46D' sert..res....RD. DC X'D2C1C6D2C16DD6D76DD9C5E26DD7C1E2' KAFKA.OP.RES.PAS DC X'E20081A2A28599A37A405A999298606E' S.assert...rkq.. DC X'9992986D86A684980000D8A485A48540' rkq.fwdq..Queue. DC X'6C97407F6CA27F404D9985868395A340' .p...s...refcnt. DC X'6C846B4086938187A240F0A76CA76B40' .d..flags.0x.x.. DC X'6C84409697A26B406C9393844082A8A3' .d.ops...lld.byt DC X'85A25D15000040D8C9D6408684406C84' es.....QIO.fd..d DC X'150040E28599A5854083819393828183' ...Serve.callbac DC X'92406C976B4096978198A485406C9715' k..p..opaque..p. DC X'000040C69699A6819984858440606E15' ...Forwarded.... DC X'000040D8A485A48584409697A27A1500' ...Queued.ops... DC X'40406C97406CA2404DA56C846B408693' ...p..s..v.d..fl DC X'8187A240F0A76CA76B4097998996406C' ags.0x.x..prio.. DC X'846B40938595406C846B40A296A49983' d..len..d..sourc DC X'85406CA26B4099859793A898406C975D' e..s..replyq..p. DC X'150060008485A2A39996A800D7999684' ....destroy.Prod DC X'A4838500C685A3838800D68686A285A3' uce.Fetch.Offset DC X'0000D485A3818481A3810000D3858184' ..Metadata..Lead DC X'8599C19584C9A2990000E2A39697D985' erAndIsr..StopRe DC X'979389838100E4978481A385D485A381' plica.UpdateMeta DC X'8481A3810000C39695A3999693938584' data..Controlled DC X'E288A4A38496A6950000D68686A285A3' Shutdown..Offset DC X'C396949489A30000D68686A285A3C685' Commit..OffsetFe DC X'A3838800C6899584C396969984899581' tch.FindCoordina DC X'A3969900D1968995C79996A49700C885' tor.JoinGroup.He DC X'8199A3828581A300D38581A585C79996' artbeat.LeaveGro DC X'A4970000E2A89583C79996A49700C485' up..SyncGroup.De DC X'A28399898285C79996A497A20000D389' scribeGroups..Li DC X'A2A3C79996A497A20000E281A293C881' stGroups..SaslHa DC X'9584A28881928500C19789E58599A289' ndshake.ApiVersi DC X'96950000C3998581A385E396978983A2' on..CreateTopics DC X'0000C4859385A385E396978983A20000' ..DeleteTopics.. DC X'C4859385A385D98583969984A200C995' DeleteRecords.In DC X'89A3D7999684A4838599C9840000D686' itProducerId..Of DC X'86A285A3C69699D38581848599C59796' fsetForLeaderEpo DC X'83880000C18484D78199A389A3899695' ch..AddPartition DC X'A2E396E3A7950000C18484D68686A285' sToTxn..AddOffse DC X'A3A2E396E3A79500C59584E3A7950000' tsToTxn.EndTxn.. DC X'E69989A385E3A795D48199928599A200' WriteTxnMarkers. DC X'E3A795D68686A285A3C396949489A300' TxnOffsetCommit. DC X'C485A28399898285C18393A20000C399' DescribeAcls..Cr DC X'8581A385C18393A20000C4859385A385' eateAcls..Delete DC X'C18393A20000C485A28399898285C396' Acls..DescribeCo DC X'95868987A200C193A38599C396958689' nfigs.AlterConfi DC X'87A20000C193A38599D9859793898381' gs..AlterReplica DC X'D39687C48999A200C485A28399898285' LogDirs.Describe DC X'D39687C48999A200E281A293C1A4A388' LogDirs.SaslAuth DC X'8595A3898381A3850000C3998581A385' enticate..Create DC X'D78199A389A3899695A20000C3998581' Partitions..Crea DC X'A385C48593858781A3899695E3969285' teDelegationToke DC X'9500D9859585A6C48593858781A38996' n.RenewDelegatio DC X'95E3969285950000C5A797899985C485' nToken..ExpireDe DC X'93858781A3899695E39692859500C485' legationToken.De DC X'A28399898285C48593858781A3899695' scribeDelegation DC X'E39692859500C4859385A385C79996A4' Token.DeleteGrou DC X'97A20000C5938583A3D38581848599A2' ps..ElectLeaders DC X'D98598A485A2A300C995839985948595' Request.Incremen DC X'A38193C193A38599C39695868987A2D9' talAlterConfigsR DC X'8598A485A2A30000C193A38599D78199' equest..AlterPar DC X'A389A3899695D98581A2A28987959485' titionReassignme DC X'95A3A2D98598A485A2A30000D389A2A3' ntsRequest..List DC X'D78199A389A3899695D98581A2A28987' PartitionReassig DC X'95948595A3A2D98598A485A2A300D686' nmentsRequest.Of DC X'86A285A3C4859385A385D98598A485A2' fsetDeleteReques DC X'A300C485A28399898285C393898595A3' t.DescribeClient DC X'D8A496A381A2D98598A485A2A300C193' QuotasRequest.Al DC X'A38599C393898595A3D8A496A381A2D9' terClientQuotasR DC X'8598A485A2A30000C485A28399898285' equest..Describe DC X'E4A28599E283998194C39985848595A3' UserScramCredent DC X'898193A2D98598A485A2A300C193A385' ialsRequest.Alte DC X'99E4A28599E283998194C39985848595' rUserScramCreden DC X'A3898193A2D98598A485A2A30000E596' tialsRequest..Vo DC X'A385D98598A485A2A300C285878995D8' teRequest.BeginQ DC X'A49699A494C597968388D98598A485A2' uorumEpochReques DC X'A300C59584D8A49699A494C597968388' t.EndQuorumEpoch DC X'D98598A485A2A300C485A28399898285' Request.Describe DC X'D8A49699A494D98598A485A2A300C193' QuorumRequest.Al DC X'A38599C9A299D98598A485A2A300E497' terIsrRequest.Up DC X'8481A385C68581A3A49985A2D98598A4' dateFeaturesRequ DC X'85A2A300C595A58593969785D98598A4' est.EnvelopeRequ DC X'85A2A30095969585000087A989970000' est.none..gzip.. DC X'A295819797A8000093A9F400A9A2A384' snappy..lz4.zstd DC X'0000899588859989A300839695868987' ..inherit.config DC X'A4998584000093858199958584008995' ured..learned.in DC X'A3859995819300009396878983819300' ternal..logical. DC X'C99589A30000E3859994899581A38500' Init..Terminate. DC X'C681A38193C5999996990000D98598A4' FatalError..Requ DC X'85A2A3D7C9C40000E68189A3E3998195' estPID..WaitTran DC X'A2979699A300E68189A3D7C9C400C1A2' sport.WaitPID.As DC X'A289879585840000C499818995D985A2' signed..DrainRes DC X'85A30000C499818995C2A4949700D985' et..DrainBump.Re DC X'8184A8D596A3C18392858400D9858184' adyNotAcked.Read DC X'A800C995E3998195A28183A389969500' y.InTransaction. DC X'C285878995C396949489A300C3969494' BeginCommit.Comm DC X'89A3A3899587E3998195A28183A38996' ittingTransactio DC X'9500C396949489A3D596A3C183928584' n.CommitNotAcked DC X'0000C1829699A3899587E3998195A281' ..AbortingTransa DC X'83A389969500C1829699A38584D596A3' ction.AbortedNot DC X'C18392858400C1829699A381829385C5' Acked.AbortableE DC X'999996990000' rror.. * * Rent ref/def section * @Drd_kafka_yield_thread ALIAS X'99846D92818692816DA8898593846DA38899858* 184' ENTRY @Drd_kafka_yield_thread @Drd_kafka_yield_thread DS 0H * * * Re-entrant Data Initialization Section * @@INIT@ ALIAS C'rdkafka_queue:' @@INIT@ CSECT @@INIT@ AMODE ANY @@INIT@ RMODE ANY DC XL1'5' DC AL3(0) DC AL4(288) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000001' DC X'00000000' DC X'000000FF' DC X'0102039C09867F978D8E0B0C0D0E0F10' .....f.p........ DC X'1112139D8508871819928F1C1D1E1F80' ....e.g..k...... DC X'818283840A171B88898A8B8C05060790' abcd...hi....... DC X'9116939495960498999A9B14159E1A20' j.lmno.qr....... DC X'A0E2E4E0E1E3E5E7F1A22E3C282B7C26' .SU..TVX1s...... DC X'E9EAEBE8EDEEEFECDF21242A293B5E2D' Z..Y............ DC X'2FC2C4C0C1C3C5C7D1A62C255F3E3FF8' .BD.ACEGJw.....8 DC X'C9CACBC8CDCECFCC603A2340273D22D8' I..H...........Q DC X'616263646566676869ABBBF0FDFEB1B0' ...........0.... DC X'6A6B6C6D6E6F707172AABAE6B8C6A4B5' ...........W.Fu. DC X'7E737475767778797AA1BFD05BDEAEAC' ................ DC X'A3A5B7A9A7B6BCBDBEDDA8AF5DB4D77B' tv.zx.....y...P. DC X'414243444546474849ADF4F6F2F3F57D' ..........46235. DC X'4A4B4C4D4E4F505152B9FBFCF9FAFF5C' ............9... DC X'F7535455565758595AB2D4D6D2D3D530' 7.........MOKLN. DC X'313233343536373839B3DBDCD9DA9F40' ............R... * DC XL1'5' DC AL3(0) DC AL4(480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000101' DC X'00000000' DC X'000000A0' DC X'010203372D2E2F1605150B0C0D0E0F10' ................ DC X'1112133C3D322618193F271C1D1E1F40' ................ DC X'5A7F7B5B6C507D4D5D5C4E6B604B61F0' ...............0 DC X'F1F2F3F4F5F6F7F8F97A5E4C7E6E6F7C' 123456789....... DC X'C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7' ABCDEFGHIJKLMNOP DC X'D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D79' QRSTUVWXYZ...... DC X'81828384858687888991929394959697' abcdefghijklmnop DC X'9899A2A3A4A5A6A7A8A9C04FD0A10720' qrstuvwxyz...... DC X'2122232425061728292A2B2C090A1B30' ................ DC X'311A333435360838393A3B04143EFF80' ................ * DC XL1'5' DC AL3(0) DC AL4(520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000001C0' DC X'00000000' DC X'00000001' DC X'8A40404040404040' ........ * DC XL1'5' DC AL3(0) DC AL4(560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000001E0' DC X'00000000' DC X'00000001' DC X'8B40404040404040' ........ * DC XL1'D' DC AL3(0) DC AL4(600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000220' DC ADL8(@DATA) DC X'00000000' DC X'0000042A' * DC XL1'D' DC AL3(0) DC AL4(640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000228' DC ADL8(@DATA) DC X'00000000' DC X'00000432' * DC XL1'D' DC AL3(0) DC AL4(680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000230' DC ADL8(@DATA) DC X'00000000' DC X'00000438' * DC XL1'D' DC AL3(0) DC AL4(720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000238' DC ADL8(@DATA) DC X'00000000' DC X'00000440' * DC XL1'D' DC AL3(0) DC AL4(760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000240' DC ADL8(@DATA) DC X'00000000' DC X'0000044A' * DC XL1'D' DC AL3(0) DC AL4(800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000248' DC ADL8(@DATA) DC X'00000000' DC X'00000458' * DC XL1'D' DC AL3(0) DC AL4(840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000250' DC ADL8(@DATA) DC X'00000000' DC X'00000464' * DC XL1'D' DC AL3(0) DC AL4(880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000258' DC ADL8(@DATA) DC X'00000000' DC X'00000474' * DC XL1'D' DC AL3(0) DC AL4(920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000260' DC ADL8(@DATA) DC X'00000000' DC X'00000488' * DC XL1'D' DC AL3(0) DC AL4(960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000268' DC ADL8(@DATA) DC X'00000000' DC X'00000496' * DC XL1'D' DC AL3(0) DC AL4(1000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000270' DC ADL8(@DATA) DC X'00000000' DC X'000004A2' * DC XL1'D' DC AL3(0) DC AL4(1040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000278' DC ADL8(@DATA) DC X'00000000' DC X'000004B2' * DC XL1'D' DC AL3(0) DC AL4(1080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000280' DC ADL8(@DATA) DC X'00000000' DC X'000004BC' * DC XL1'D' DC AL3(0) DC AL4(1120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000288' DC ADL8(@DATA) DC X'00000000' DC X'000004C6' * DC XL1'D' DC AL3(0) DC AL4(1160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000290' DC ADL8(@DATA) DC X'00000000' DC X'000004D2' * DC XL1'D' DC AL3(0) DC AL4(1200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000298' DC ADL8(@DATA) DC X'00000000' DC X'000004DC' * DC XL1'D' DC AL3(0) DC AL4(1240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002A0' DC ADL8(@DATA) DC X'00000000' DC X'000004EC' * DC XL1'D' DC AL3(0) DC AL4(1280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002A8' DC ADL8(@DATA) DC X'00000000' DC X'000004F8' * DC XL1'D' DC AL3(0) DC AL4(1320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002B0' DC ADL8(@DATA) DC X'00000000' DC X'00000506' * DC XL1'D' DC AL3(0) DC AL4(1360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002B8' DC ADL8(@DATA) DC X'00000000' DC X'00000512' * DC XL1'D' DC AL3(0) DC AL4(1400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002C0' DC ADL8(@DATA) DC X'00000000' DC X'00000520' * DC XL1'D' DC AL3(0) DC AL4(1440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002C8' DC ADL8(@DATA) DC X'00000000' DC X'0000052E' * DC XL1'D' DC AL3(0) DC AL4(1480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002D0' DC ADL8(@DATA) DC X'00000000' DC X'0000053C' * DC XL1'D' DC AL3(0) DC AL4(1520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002D8' DC ADL8(@DATA) DC X'00000000' DC X'0000054C' * DC XL1'D' DC AL3(0) DC AL4(1560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002E0' DC ADL8(@DATA) DC X'00000000' DC X'00000562' * DC XL1'D' DC AL3(0) DC AL4(1600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002E8' DC ADL8(@DATA) DC X'00000000' DC X'00000576' * DC XL1'D' DC AL3(0) DC AL4(1640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002F0' DC ADL8(@DATA) DC X'00000000' DC X'00000586' * DC XL1'D' DC AL3(0) DC AL4(1680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000002F8' DC ADL8(@DATA) DC X'00000000' DC X'0000058E' * DC XL1'D' DC AL3(0) DC AL4(1720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000300' DC ADL8(@DATA) DC X'00000000' DC X'0000059E' * DC XL1'D' DC AL3(0) DC AL4(1760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000308' DC ADL8(@DATA) DC X'00000000' DC X'000005AE' * DC XL1'D' DC AL3(0) DC AL4(1800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000310' DC ADL8(@DATA) DC X'00000000' DC X'000005BC' * DC XL1'D' DC AL3(0) DC AL4(1840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000318' DC ADL8(@DATA) DC X'00000000' DC X'000005C8' * DC XL1'D' DC AL3(0) DC AL4(1880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000320' DC ADL8(@DATA) DC X'00000000' DC X'000005D4' * DC XL1'D' DC AL3(0) DC AL4(1920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000328' DC ADL8(@DATA) DC X'00000000' DC X'000005E4' * DC XL1'D' DC AL3(0) DC AL4(1960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000330' DC ADL8(@DATA) DC X'00000000' DC X'000005F2' * DC XL1'D' DC AL3(0) DC AL4(2000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000338' DC ADL8(@DATA) DC X'00000000' DC X'00000606' * DC XL1'D' DC AL3(0) DC AL4(2040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000340' DC ADL8(@DATA) DC X'00000000' DC X'00000616' * DC XL1'D' DC AL3(0) DC AL4(2080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000348' DC ADL8(@DATA) DC X'00000000' DC X'00000628' * DC XL1'D' DC AL3(0) DC AL4(2120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000350' DC ADL8(@DATA) DC X'00000000' DC X'0000063A' * DC XL1'D' DC AL3(0) DC AL4(2160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000358' DC ADL8(@DATA) DC X'00000000' DC X'00000650' * DC XL1'D' DC AL3(0) DC AL4(2200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000360' DC ADL8(@DATA) DC X'00000000' DC X'00000666' * DC XL1'D' DC AL3(0) DC AL4(2240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000368' DC ADL8(@DATA) DC X'00000000' DC X'0000067C' * DC XL1'D' DC AL3(0) DC AL4(2280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000370' DC ADL8(@DATA) DC X'00000000' DC X'00000694' * DC XL1'D' DC AL3(0) DC AL4(2320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000378' DC ADL8(@DATA) DC X'00000000' DC X'000006A2' * DC XL1'D' DC AL3(0) DC AL4(2360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000380' DC ADL8(@DATA) DC X'00000000' DC X'000006B6' * DC XL1'D' DC AL3(0) DC AL4(2400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000388' DC ADL8(@DATA) DC X'00000000' DC X'000006D6' * DC XL1'D' DC AL3(0) DC AL4(2440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000390' DC ADL8(@DATA) DC X'00000000' DC X'000006FA' * DC XL1'D' DC AL3(0) DC AL4(2480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000398' DC ADL8(@DATA) DC X'00000000' DC X'0000071C' * DC XL1'D' DC AL3(0) DC AL4(2520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003A0' DC ADL8(@DATA) DC X'00000000' DC X'00000730' * DC XL1'D' DC AL3(0) DC AL4(2560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003A8' DC ADL8(@DATA) DC X'00000000' DC X'0000074C' * DC XL1'D' DC AL3(0) DC AL4(2600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003B0' DC ADL8(@DATA) DC X'00000000' DC X'00000766' * DC XL1'D' DC AL3(0) DC AL4(2640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003B8' DC ADL8(@DATA) DC X'00000000' DC X'0000078A' * DC XL1'D' DC AL3(0) DC AL4(2680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003C0' DC ADL8(@DATA) DC X'00000000' DC X'000007AC' * DC XL1'D' DC AL3(0) DC AL4(2720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003C8' DC ADL8(@DATA) DC X'00000000' DC X'000007B8' * DC XL1'D' DC AL3(0) DC AL4(2760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003D0' DC ADL8(@DATA) DC X'00000000' DC X'000007D0' * DC XL1'D' DC AL3(0) DC AL4(2800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003D8' DC ADL8(@DATA) DC X'00000000' DC X'000007E6' * DC XL1'D' DC AL3(0) DC AL4(2840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003E0' DC ADL8(@DATA) DC X'00000000' DC X'000007FC' * DC XL1'D' DC AL3(0) DC AL4(2880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003E8' DC ADL8(@DATA) DC X'00000000' DC X'0000080C' * DC XL1'D' DC AL3(0) DC AL4(2920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000003F0' DC ADL8(@DATA) DC X'00000000' DC X'00000822' * DC XL1'D' DC AL3(0) DC AL4(2960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004C0' DC ADL8(@DATA) DC X'00000000' DC X'00000832' * DC XL1'D' DC AL3(0) DC AL4(3000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004C8' DC ADL8(@DATA) DC X'00000000' DC X'00000838' * DC XL1'D' DC AL3(0) DC AL4(3040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004D0' DC ADL8(@DATA) DC X'00000000' DC X'0000083E' * DC XL1'D' DC AL3(0) DC AL4(3080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004D8' DC ADL8(@DATA) DC X'00000000' DC X'00000846' * DC XL1'D' DC AL3(0) DC AL4(3120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004E0' DC ADL8(@DATA) DC X'00000000' DC X'0000084A' * DC XL1'D' DC AL3(0) DC AL4(3160) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000004E8' DC ADL8(@DATA) DC X'00000000' DC X'00000850' * DC XL1'D' DC AL3(0) DC AL4(3200) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000510' DC ADL8(@DATA) DC X'00000000' DC X'00000858' * DC XL1'D' DC AL3(0) DC AL4(3240) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000518' DC ADL8(@DATA) DC X'00000000' DC X'00000864' * DC XL1'D' DC AL3(0) DC AL4(3280) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000520' DC ADL8(@DATA) DC X'00000000' DC X'0000086C' * DC XL1'D' DC AL3(0) DC AL4(3320) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000528' DC ADL8(@DATA) DC X'00000000' DC X'00000876' * DC XL1'D' DC AL3(0) DC AL4(3360) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000630' DC ADL8(@DATA) DC X'00000000' DC X'0000087E' * DC XL1'D' DC AL3(0) DC AL4(3400) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000638' DC ADL8(@DATA) DC X'00000000' DC X'00000884' * DC XL1'D' DC AL3(0) DC AL4(3440) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000640' DC ADL8(@DATA) DC X'00000000' DC X'0000088E' * DC XL1'D' DC AL3(0) DC AL4(3480) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000648' DC ADL8(@DATA) DC X'00000000' DC X'0000089A' * DC XL1'D' DC AL3(0) DC AL4(3520) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000650' DC ADL8(@DATA) DC X'00000000' DC X'000008A6' * DC XL1'D' DC AL3(0) DC AL4(3560) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000658' DC ADL8(@DATA) DC X'00000000' DC X'000008B4' * DC XL1'D' DC AL3(0) DC AL4(3600) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000660' DC ADL8(@DATA) DC X'00000000' DC X'000008BC' * DC XL1'D' DC AL3(0) DC AL4(3640) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000668' DC ADL8(@DATA) DC X'00000000' DC X'000008C6' * DC XL1'D' DC AL3(0) DC AL4(3680) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000670' DC ADL8(@DATA) DC X'00000000' DC X'000008D2' * DC XL1'D' DC AL3(0) DC AL4(3720) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000678' DC ADL8(@DATA) DC X'00000000' DC X'0000087E' * DC XL1'D' DC AL3(0) DC AL4(3760) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000680' DC ADL8(@DATA) DC X'00000000' DC X'000008B4' * DC XL1'D' DC AL3(0) DC AL4(3800) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000688' DC ADL8(@DATA) DC X'00000000' DC X'000008DC' * DC XL1'D' DC AL3(0) DC AL4(3840) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000690' DC ADL8(@DATA) DC X'00000000' DC X'000008EA' * DC XL1'D' DC AL3(0) DC AL4(3880) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'00000698' DC ADL8(@DATA) DC X'00000000' DC X'000008F0' * DC XL1'D' DC AL3(0) DC AL4(3920) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006A0' DC ADL8(@DATA) DC X'00000000' DC X'000008FE' * DC XL1'D' DC AL3(0) DC AL4(3960) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006A8' DC ADL8(@DATA) DC X'00000000' DC X'0000090A' * DC XL1'D' DC AL3(0) DC AL4(4000) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006B0' DC ADL8(@DATA) DC X'00000000' DC X'00000920' * DC XL1'D' DC AL3(0) DC AL4(4040) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006B8' DC ADL8(@DATA) DC X'00000000' DC X'00000930' * DC XL1'D' DC AL3(0) DC AL4(4080) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006C0' DC ADL8(@DATA) DC X'00000000' DC X'00000944' * DC XL1'D' DC AL3(0) DC AL4(4120) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006C8' DC ADL8(@DATA) DC X'00000000' DC X'00000954' * DC XL1'D' DC AL3(0) DC AL4(0) DC 4X'00' DC Q(@@STATIC) DC X'00000000' DC X'000006D0' DC ADL8(@DATA) DC X'00000000' DC X'0000088E' * END
programs/oeis/099/A099359.asm
karttu/loda
1
166372
<filename>programs/oeis/099/A099359.asm ; A099359: a(n) = (2^n + 1)^3 - 2. ; 6,25,123,727,4911,35935,274623,2146687,16974591,135005695,1076890623,8602523647,68769820671,549957165055,4398851866623,35187593412607,281487861809151,2251851353686015,18014604668698623 mov $1,2 pow $1,$0 add $1,1 pow $1,3 sub $1,2
18. TRIANGLE.asm
rng70/Assembly-Programming
0
13783
; PRINT A TRIANGLE OF NUMBER ; 1 ; 1 2 ; 1 2 3 ; 1 2 3 4 ; 1 2 3 4 5 ; 1 2 3 4 5 6 ; 1 2 3 4 5 6 7 ; 1 2 3 4 5 6 7 8 ; 1 2 3 4 5 6 7 8 9 .MODEL SMALL .STACK 100H .DATA MSG DB ' $' .CODE MAIN PROC ; INITIALIZATION MOV AX, @DATA MOV DS, AX MOV CL, 1 ; I = 1 MOV BL, 9 ; N = 9 LOOP1: MOV AH, 2 MOV DL, '1' MOV BH, 1 ; J = 1 LOOP2: INT 21H ; PRINT MSG LEA DX, MSG MOV AH, 9 INT 21H MOV AH, 2 INC DL INC BH CMP BH, CL JNG LOOP2 MOV AH, 2 MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H INC CL CMP CL, BL JNG LOOP1 ; RETURN TO DOS MOV AH, 4CH INT 21H MAIN ENDP
Commands/Clipboard Commands suite/the clipboard/the clipboard.applescript
looking-for-a-job/applescript-examples
1
4084
#!/usr/bin/osascript the clipboard
src/main.adb
psyomn/ash
11
12470
<reponame>psyomn/ash -- Copyright 2019 <NAME> (psyomn) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Text_IO; use Ada.Text_IO; with Ada.Exceptions; use Ada.Exceptions; with Listeners; use Listeners; with CLI; use CLI; procedure Main is Listener_Task : Launch_Listener; l1 : Listeners.Listener := Make_Listener (Port => 3000, Root => "./www1", Host => "localhost"); begin Process_Command_Line_Arguments (l1); Listener_Task.Construct (l1); Listener_Task.Start; Listener_Task.Stop; exception when E : CLI_Argument_Exception => Put_Line ("error: " & Exception_Message (E)); New_Line; Put_Line ("example usage: "); Put_Line ("ash [-h host] [-p port] [-r rootdir]"); when E : others => Put_Line ( "error:" & Exception_Message (E) & " " & ""); end Main;
Calculadora.asm
AbrahamRH/Calculadora_ASM
0
28433
<filename>Calculadora.asm ; Autor: <NAME> ; Fecha de termino: 01/02/21 ; Descripción: Este programa realiza operaciones aritmeéticas básicas tales como ; La suma, resta, división y multiplicación de números enteros. ; Es programa recibe los valores a operar por el teclado y se muestran los resultados y opciones ; en pantalla por un menú. ; Versión del ensamblador: Turbo Assembler version 4.1 ; Comandos de ensamblado y enlazado: ; TASM.EXE CALCULADORA ; TLINK.EXE CALCULADORA ; Page 60, 132 Title Calculadora .286 ; ===========MACROS=========== CasteoACadena macro num, cadena ;Obtenemos posición del cursor mov ah, 03h mov bh, 00 int 10h xor ax, ax mov al, dl ; la posición la guardamos en las variables renglon y columna mov columna, ax mov al, dh mov renglon, ax mov dx, offset cadena push num ; Numéro a castear push dx ; AsciiMas call castCadena endm ImprimirCadena macro cadena mov ax, offset cadena push ax call imprimeCad endm MoverCursor macro ren, col push ren ; Renglon push col ; Columna call Cursor endm continue macro cad MoverCursor 15, 22 ImprimirCadena cad mov ah, 08h int 21h endm ;Macro encargada de imprimir el menu con las opciones de las operaciones ImprimeMenu macro cad1, cad2, cad3, ren, col MoverCursor ren, col inc ren ImprimirCadena cad1 MoverCursor ren, col inc ren ImprimirCadena cad2 MoverCursor ren, col ImprimirCadena cad3 inc ren MoverCursor ren, col endm ;Macro para obtener un caracter getChar macro var, charDir mov dx, offset var mov ah, 0ah int 21h ; Leemos el caracter de la pantalla mov si, dx mov al, [si+2] ; Obtenemos el caracter y lo guardamos en al mov bx, offset charDir mov [bx], al ; Guardamos el caracter en la direccion de la variable endm ;Macro para castear de cadena a numero getNum macro var, num mov ah, 0ah mov dx, offset var int 21h mov di, offset num push dx ; cadRec push di ; numero call castNum endm IngresaNum macro banner, prompt, var, num mov ax, 00 mov num, ax ImprimirCadena banner ImprimirCadena prompt getNum var, num ; Guardamos el numero endm IniciaPantalla macro ren, col call clrscr call setFondo call setCuadro mov ren, 5 mov col, 8 MoverCursor ren, col endm ; ============================ .model small .stack 64 .data x dw 00 ; Numero 1 a recibir y dw 00 ; Numero 2 a recibir z dw 00 ; Resultado temp dw 00 opcion db 00 ; Variables utilizadas para el casteo a numero numCad db 6,0,' ' ; Variable para recibir los numeros a operar ; Se permite una mantisa de 2^16 unicamente caracteres db 00 ; Es el número de caracteres introducidos potencia db 00 bienvenida db 'Bienvenido a la calculadora de enteros / Mantisa maxima es de 65536 ','$' bannerOp db 'Que operacion desea realizar? (indique con el caracter S,R,M,D) ','$' opciones db 'Suma - S, Resta - R, Multiplicacion - M, Division - D','$' prompt db '-> ','$' bannerOp2 db 'Desea realizar otra operacion? Si - 1','$' opciones2 db '(Si no desea otra operacion introduzca otro caracter)','$' strcontinue db 'Presione una tecla para continuar...','$' strSuma db 'Se realizara la suma','$' strResta db 'Se realizara la resta','$' strMulti db 'Se realizara la multiplicacion','$' strDivi db 'Se realizara la division','$' strDefault db 'Opcion no reconocida','$' strResultado db 'El resultado es: ','$' strResiduo db 'El residuo es: ','$' strDesborde db 'Hubo un desbordamiento, la mantisa es de 65,535 ','$' strDesbordeRes db 'Hubo un desbordamiento, la mantisa es de 32,768 ','$' strSigno db '- ','$' ingresarNum db 'Ingresa un numero a operar ','$' opRealizar db 2,0,' ','$' renglon dw 5 columna dw 8 ; Variables usadas para ubicar el cursor AsciiMas dw 00 diez equ 10 ;Caracteres para imprimir el cuadro esquina db '+','$' vertical db '|','$' horizontal db '-','$' estaDibujado db 00 ; Variable que nos sirve para identificar si se dibujo .code Principal proc assume mov ax, @data mov ds, ax mov es, ax Inicio: pusha IniciaPantalla renglon, columna ; Imprimimos el menu de opciones ImprimeMenu bienvenida, bannerOp, opciones, renglon, columna ImprimirCadena prompt getChar opRealizar, opcion ; Obtenemos la opcion por el teclado IniciaPantalla renglon, columna MoverCursor renglon, columna inc renglon Suma: cmp opcion, 'S' jne intermedioSuma ;Obtenemos los dos números ImprimirCadena strSuma MoverCursor renglon, columna IngresaNum ingresarNum, prompt, numCad, x ; Guardamos el num en X inc renglon MoverCursor renglon, columna jmp mitadSuma intermedioSuma: jmp resta mitadSuma: IngresaNum ingresarNum, prompt, numCad, y ; Guardamos el num en y inc renglon MoverCursor renglon, columna ImprimirCadena strResultado mov ax, x add ax, y jc desSuma ; Se verifica que no exista un desborde mov z, ax CasteoACadena z, AsciiMas continue strcontinue jmp otraOp desSuma: ;Si hay un desborde se avisa y se pregunta si se quiere otra operación imprimirCadena strDesborde continue strcontinue jmp otraOp Resta: cmp opcion, 'R' jne intermedioResta ImprimirCadena strResta MoverCursor renglon, columna IngresaNum ingresarNum, prompt, numCad, x ; Guardamos el num en X inc renglon MoverCursor renglon, columna jmp mitadResta intermedioResta: jmp multiplicacion mitadResta: IngresaNum ingresarNum, prompt, numCad, y ; Guardamos el num en y inc renglon MoverCursor renglon, columna ImprimirCadena strResultado mov ax, x sub ax, y jns positivo ;Hacemos el complemento a 2 si el resultado es negativo not ax add ax, 1 cmp ax, 8000h ja desResta ; verificamos si no hay desborde despues del complemento a 2 pusha ImprimirCadena strSigno popa positivo: ;Si es positivo saltamos cmp ax, 8000h ja desResta ; verificamos si no hay desborde mov z, ax CasteoACadena z, AsciiMas continue strcontinue jmp otraOp desResta: ;Si hay un desborde se avisa y se pregunta si se quiere otra operación imprimirCadena strDesbordeRes continue strcontinue jmp otraOp multiplicacion: cmp opcion, 'M' jne intermedioMulti imprimircadena strMulti MoverCursor renglon, columna IngresaNum ingresarNum, prompt, numCad, x ; Guardamos el num en X inc renglon MoverCursor renglon, columna jmp mitadMulti intermedioMulti: jmp division mitadMulti: IngresaNum ingresarNum, prompt, numCad, y ; Guardamos el num en y inc renglon MoverCursor renglon, columna ImprimirCadena strResultado mov ax, x mul y jo desMulti mov z, ax CasteoACadena z, AsciiMas continue strcontinue jmp otraOp desMulti: ;Si hay un desborde se avisa y se pregunta si se quiere otra operación imprimirCadena strDesborde continue strcontinue jmp otraOp division: cmp opcion, 'D' jne intermedioDiv imprimircadena strDivi MoverCursor renglon, columna IngresaNum ingresarNum, prompt, numCad, x ; Guardamos el num en X inc renglon MoverCursor renglon, columna cmp temp, 1 ; Bandera para saber si hubo un desbordamiento je desDiv ; Saltamos si hay un desborde que se verifica si se paso la mantisa de 2^15 jmp mitadDiv intermedioDiv: jmp default desDiv: ;Si hay un desborde se avisa y se pregunta si se quiere otra operación imprimirCadena strDesbordeRes continue strcontinue jmp otraOp mitadDiv: IngresaNum ingresarNum, prompt, numCad, y ; Guardamos el num en d inc renglon MoverCursor renglon, columna ImprimirCadena strResultado mov dx, 00h mov ax, x mov bx, y; División con mantisa 2^15 div bx mov z, ax ; Cociente mov x, dx ; Residuo CasteoACadena z, AsciiMas inc renglon mov columna, 8 MoverCursor renglon, columna ImprimirCadena strResiduo CasteoACadena x, AsciiMas continue strcontinue jmp otraOp default: imprimircadena strdefault continue strcontinue OtraOp: IniciaPantalla renglon, columna inc renglon MoverCursor renglon, columna inc renglon ImprimirCadena bannerOp2 MoverCursor renglon, columna inc renglon ImprimirCadena opciones2 MoverCursor renglon, columna inc renglon ImprimirCadena prompt getChar opRealizar, opcion popa xor opcion, 030h cmp opcion,1 jne Fin jmp Inicio Fin: popa mov ah, 04ch mov al,0 int 21h Principal endp clrscr proc mov ah,0fh; limpia pantalla int 10h mov ah,0 INT 10h ret clrscr endp setFondo proc ; Cambiamos el color mov ah, 06h mov al, 00h mov bh, 2fh ; Fondo verde con letras blancas mov cx, 00h mov dx, 2080h ; Filas y columnas int 10h ret setFondo endp Cursor proc mov bp,sp add bp,4 mov dh,[bp]; renglon mov dl,[bp-2]; columna mov ah,02h mov bh,00 int 10h ; ubicamos ret 4 Cursor endp imprimeCad proc mov bp,sp add bp,02 mov dx,[bp] ; obteniendo la dir de la cadena a imprimir mov ah,09h int 21h ret 2 imprimeCad endp imprimeCar proc mov bp, sp add bp, 02 xor ax, ax mov al, [bp] ; Caracter a imprimir mov ah, 09h mov bh, 00 mov cx, 1 int 10h ret 2 imprimeCar endp castCadena proc mov bp, sp add bp, 04 mov ax, [bp] ; Numero a castear mov si, [bp-2] ; Mas mov bx, diez mov cx, 5 casteo: mov dx, 0h div bx mov temp, cx mov [si], ax ; Más significativo xor dl, 030h ; Obtenemos el digito push dx call imprimeCar dec columna ;Ubicamos el cursor push renglon ; renglon push columna ; columna call Cursor mov cx, temp mov ax, [si] loop casteo ret 4 castCadena endp castNum proc mov bp, sp add bp, 04 mov si, [bp] ; Dir CadRec mov di, [bp-2] inc si mov temp, 0 mov bl, [si] mov caracteres, bl mov potencia, bl xor cx, cx mov bx, diez castNumero: inc si dec potencia xor ax, ax mov al, [si] xor al, 030h mov cl, potencia obtenerPotencia: ; Obtiene la potencia de 10^n para posicionar el digito cmp cl, 0 je continuar mul bx loop obtenerPotencia continuar: add [di], ax cmp dx, 0 jz sigue mov temp, 1; Usamos una bandera para ver cuando sobrepasa la mantisa sigue: mov cl, caracteres dec caracteres loop castNumero ret 4 castNum endp setCuadro proc mov renglon, 3 mov columna, 4 mov estaDibujado, 0 lineaHorizontal: ; Imprimimos las lineas horizontales del recuadro mov cx, 73 filas: MoverCursor renglon, columna inc columna ImprimirCadena horizontal loop filas inc estaDibujado ; En la primera vuelta estaDibujado = 1 cmp estaDibujado, 1 jne lineaVertical ; Si no es 1 (segunda vuelta) nos mantenemos en la misma columna sub columna, 73 lineaVertical: ; Imprimimos las lineas verticales mov cx, 20 columnas: MoverCursor renglon, columna cmp estaDibujado, 1 ; Si es la segunda vuelta, nos movemos arriba je haciaAbajo dec renglon jmp sigueImpresion haciaAbajo: inc renglon sigueImpresion: imprimircadena vertical loop columnas cmp estaDibujado, 1 je lineaHorizontal ;Dibujamos la linea horizontal inferior ret setCuadro endp end Principal
oeis/275/A275906.asm
neoneye/loda-programs
11
165448
<reponame>neoneye/loda-programs ; A275906: Expansion of (1+x+x^2) / (1-4*x-4*x^2-x^3). ; Submitted by <NAME> ; 1,5,25,121,589,2865,13937,67797,329801,1604329,7804317,37964385,184679137,898378405,4370194553,21258970969,103415040493,503066240401,2447184094545,11904416380277,57909468139689,281702722174409,1370353177636669,6666133067384001,32427647702257089,157745476256201029,767358628901216473,3732844068331927097,18158556265188775309,88332959962984026097,429698908981023132721,2090286032041217410581,10168272724051946199305,49463933933353677572265,240619112661663712496861,1170500459104121506475809 mov $2,1 lpb $0 sub $0,1 add $1,2 add $3,$2 add $2,$3 mov $4,$3 mov $3,$2 add $4,$2 mov $2,$1 mov $1,$4 add $2,$4 lpe mov $0,$3 mul $0,2 add $0,1
oeis/346/A346629.asm
neoneye/loda-programs
11
165613
; A346629: Number of n-digit positive integers that are the product of two integers ending with 2. ; 1,4,45,450,4500,45000,450000,4500000,45000000,450000000,4500000000,45000000000,450000000000,4500000000000,45000000000000,450000000000000,4500000000000000,45000000000000000,450000000000000000,4500000000000000000,45000000000000000000,450000000000000000000 lpb $0 mov $2,$0 cmp $0,$3 seq $2,136926 ; Numbers k such that k and k^2 use only the digits 0, 2, 7 and 9. div $2,6 sub $2,1 lpe mov $0,$2 add $0,1
src/kernel/drivers/soc/timer0_dseg.asm
rostislav-nikitin/socOS
1
177074
.dseg timer0_static_instance: .BYTE SZ_ST_TIMER0
linear_algebra/crout_lu_tst_1.adb
jscparker/math_packages
30
8436
<gh_stars>10-100 -- Test LU decomposition on a real valued square matrix. with Ada.Numerics.Generic_elementary_functions; with Crout_LU; with Text_IO; use Text_IO; with Test_Matrices; procedure crout_lu_tst_1 is type Real is digits 15; type Index is range 0..69; Starting_Index : constant Index := Index'First + 0; Final_Index : Index := Index'Last - 0; type Matrix is array(Index, Index) of Real; type Real_Extended is digits 18; -- use 18 on Intel for better error estimates. package math is new Ada.Numerics.Generic_elementary_functions(Real); --for Sqrt use math; package lu is new crout_lu (Real, Index, Matrix); use lu; package rio is new Float_IO(Real); use rio; package iio is new Integer_IO(Integer); use iio; package Make_Square_Matrix is new Test_Matrices (Real, Index, Matrix); use Make_Square_Matrix; e_Sum : Real_Extended; Sum : Real; Permute : Rearrangement; Scale : Scale_Vectors; Zero : constant Real := +0.0; One : constant Real := +1.0; Two : constant Real := +2.0; Min_Allowed_Real : constant Real := Two**(Real'Machine_Emin - Real'Machine_Emin / 8); Zero_Vector : constant Row_Vector := (others => Zero); A, A_LU, Err, L, U : Matrix := (others => (others => Zero)); Relative_Err : Real; IO_Final_Index : Integer := 4; Scale_the_Matrix : constant Boolean := True; ----------- -- Pause -- ----------- procedure Pause (s1,s2,s3,s4,s5,s6,s7,s8 : string := "") is Continue : Character := ' '; begin New_Line; if S1 /= "" then put_line (S1); end if; if S2 /= "" then put_line (S2); end if; if S3 /= "" then put_line (S3); end if; if S4 /= "" then put_line (S4); end if; if S5 /= "" then put_line (S5); end if; if S6 /= "" then put_line (S6); end if; if S7 /= "" then put_line (S7); end if; if S8 /= "" then put_line (S8); end if; new_line; begin put ("Enter a character to continue: "); get_immediate (Continue); new_line; exception when others => null; end; end pause; -------------------- -- Frobenius_Norm -- -------------------- function Frobenius_Norm (A : in Matrix; Final_Row : in Index := Final_Index; Final_Col : in Index := Final_Index; Starting_Row : in Index := Starting_Index; Starting_Col : in Index := Starting_Index) return Real is Max_A_Val : Real := Zero; Sum, Scaling, tmp : Real := Zero; begin Max_A_Val := Zero; for Row in Starting_Row .. Final_Row loop for Col in Starting_Col .. Final_Col loop if Max_A_Val < Abs A(Row, Col) then Max_A_Val := Abs A(Row, Col); end if; end loop; end loop; Scaling := One / (Max_A_Val + Min_Allowed_Real); Sum := Zero; for Row in Starting_Row .. Final_Row loop for Col in Starting_Col .. Final_Col loop tmp := Scaling * A(Row, Col); Sum := Sum + tmp * tmp; end loop; end loop; return Sqrt (Sum) * Max_A_Val; end Frobenius_Norm; begin put("Maximum matrix size is "& Integer'Image (Zero_Vector'length-(Integer(Starting_Index)-Integer(Index'First)))); new_Line; put("Input Size Of Matrix To Invert (enter an Integer)"); new_Line; get(IO_Final_Index); Final_Index := Index (Integer(Starting_Index) + IO_Final_Index - 1); Pause( "Test1: LU Decomposition of matrix A = P*L*U, where P is the permutation", "matrix that comes from Row pivoting. If 15 digit Reals are used, then we", "expect the error in the calculation of A = P*L*U to be (hopefully) a few", "parts per 10**15. In other words ||P*L*U - A|| / ||A|| should be a few", "multiples of 10**(-15). Here |*| denotes the Frobenius Norm. Other matrix", "norms give slightly different answers, so its an order of magnitude estimate.", " ", "Note: LU Decomp. with row pivoting always fails on (large) Peters_2 matrices." ); new_line; for Chosen_Matrix in Matrix_id loop put("For matrix of type "); put(Matrix_id'Image(Chosen_Matrix)); Put(":"); new_line; -- Get A: Init_Matrix (A, Chosen_Matrix, Starting_Index, Final_Index); -- Get A = P * L * U: A_LU := A; LU_decompose (A => A_LU, Scalings => Scale, Row_Permutation => Permute, Final_Index => Final_Index, Starting_Index => Starting_Index, Scaling_Desired => Scale_the_Matrix); -- if matrix A was scaled, then the L*U equals the scaled A. if Scale_the_Matrix then Scale_Cols_Then_Rows (A => A, Scalings => Scale, Final_Index => Final_Index, Starting_Index => Starting_Index); end if; for Row in Index loop for Col in Row .. Index'Last loop U(Row, Col) := A_LU(Row, Col); end loop; end loop; for Col in Index loop for Row in Col .. Index'Last loop L(Row, Col) := A_LU(Row, Col); end loop; end loop; for Col in Index loop L(Col, Col) := One; end loop; -- Multiply Original L and U as test. Get Max error: for I in Starting_Index .. Final_Index loop for J in Starting_Index .. Final_Index loop e_Sum := +0.0; for K in Starting_Index .. Final_Index loop e_Sum := e_Sum + Real_Extended (L(I, K)) * Real_Extended (U(K, J)); end loop; Sum:= Real(e_Sum); -- Product(I,J) := Sum; -- Calculate the error: Err(i, j) := Sum - A(Permute(i), j); end loop; end loop; Relative_Err := Frobenius_Norm (Err) / (Frobenius_Norm (A) + Min_Allowed_Real); put(" Err in A - P*L*U is ~ ||A - P*L*U|| / ||A|| ="); put(Relative_Err); new_line; end loop; -- Matrix_id end;
FloatingPointTests/all_instr/all.asm
sajjadahmed677/azadi-verify
2
100826
li t0, 55 li t1, 210 li s0, 0x10000000 fcvt.s.w f0,t0 fcvt.s.w f1,t1 fsw f0, 08(s0) fsw f1, 12(s0) fcvt.w.s t2,f0 fcvt.w.s t3,f1 sw t2, 08(s0) sw t3, 12(s0) add t3, t0,t1 sw t3, 80(s0) flw f0, 08(s0) flw f1, 12(s0) fadd.s f2,f0,f1 fsw f2, 16(s0) fmadd.s f4,f0,f1,f2 fsw f4, 20(s0) flw f5, 08(s0) flw f6, 12(s0) fsub.s f2,f1,f0 fsw f2, 24(s0) fmsub.s f4,f0,f1,f2 fsw f4, 28(s0) fdiv.s f9,f5,f6 fsw f9, 32(s0) fsgnj.s f10,f8,f9 fsw f10, 36(s0) fmul.s f9,f5,f6 fsw f9, 40(s0) fsgnjn.s f10,f8,f9 fsw f10, 44(s0) fsqrt.s t5,f9 fsw f5, 48(s0) fsgnjx.s f10,f8,f9 fsw f10, 52(s0) fmv.s f11,f10 fsw f11, 56(s0) fclass.s t6,f9 sw t6, 60(s0) flt.s t2, f10,f11 sw t6, 64(s0) fmv.s.x f15,t6 fmv.x.s t6,f15 fmin.s f16,f17,f18 fmax.s f16,f17,f18
text/maps/pokemon_tower_4f.asm
adhi-thirumala/EvoYellow
16
80419
_PokemonTower4BattleText1:: text "GHOST! No!" line "Kwaaah!" done _PokemonTower4EndBattleText1:: text "Where" line "is the GHOST?" prompt _PokemonTower4AfterBattleText1:: text "I must have been" line "dreaming..." done _PokemonTower4BattleText2:: text "Be cursed with" line "me! Kwaaah!" done _PokemonTower4EndBattleText2:: text "What!" prompt _PokemonTower4AfterBattleText2:: text "We can't crack" line "the identity of" cont "the GHOSTs." done _PokemonTower4BattleText3:: text "Huhuhu..." line "Beat me not!" done _PokemonTower4EndBattleText3:: text "Huh?" line "Who? What?" prompt _PokemonTower4AfterBattleText3:: text "May the departed" line "souls of #MON" cont "rest in peace..." done
apps/bootloader/memory.adb
ekoeppen/MSP430_Generic_Ada_Drivers
0
8564
package body Memory is function "+" (Addr : Flash_Memory_Range; Offset : Unsigned_16) return Flash_Memory_Range is begin return Flash_Memory_Range (Unsigned_16 (Addr) + Offset); end "+"; end Memory;
src/x86/tables.asm
negge/rav1e
0
102725
<filename>src/x86/tables.asm<gh_stars>0 ; Copyright (c) 2019-2020, The rav1e contributors. All rights reserved ; ; This source code is subject to the terms of the BSD 2 Clause License and ; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License ; was not distributed with this source code in the LICENSE file, you can ; obtain it at www.aomedia.org/license/software. If the Alliance for Open ; Media Patent License 1.0 was not distributed with this source code in the ; PATENTS file, you can obtain it at www.aomedia.org/license/patent. ; Copyright © 2018, VideoLAN and dav1d authors ; Copyright © 2018, Two Orioles, LLC ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are met: ; ; 1. Redistributions of source code must retain the above copyright notice, this ; list of conditions and the following disclaimer. ; ; 2. Redistributions in binary form must reproduce the above copyright notice, ; this list of conditions and the following disclaimer in the documentation ; and/or other materials provided with the distribution. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. %include "config.asm" %include "ext/x86/x86inc.asm" SECTION_RODATA 16 align 8, db 0 const mc_subpel_filters, db 0, 1, -3, 63, 4, -1, 0, 0, ; REGULAR db 0, 1, -5, 61, 9, -2, 0, 0, db 0, 1, -6, 58, 14, -4, 1, 0, db 0, 1, -7, 55, 19, -5, 1, 0, db 0, 1, -7, 51, 24, -6, 1, 0, db 0, 1, -8, 47, 29, -6, 1, 0, db 0, 1, -7, 42, 33, -6, 1, 0, db 0, 1, -7, 38, 38, -7, 1, 0, db 0, 1, -6, 33, 42, -7, 1, 0, db 0, 1, -6, 29, 47, -8, 1, 0, db 0, 1, -6, 24, 51, -7, 1, 0, db 0, 1, -5, 19, 55, -7, 1, 0, db 0, 1, -4, 14, 58, -6, 1, 0, db 0, 0, -2, 9, 61, -5, 1, 0, db 0, 0, -1, 4, 63, -3, 1, 0, db 0, 1, 14, 31, 17, 1, 0, 0, ; SMOOTH db 0, 0, 13, 31, 18, 2, 0, 0, db 0, 0, 11, 31, 20, 2, 0, 0, db 0, 0, 10, 30, 21, 3, 0, 0, db 0, 0, 9, 29, 22, 4, 0, 0, db 0, 0, 8, 28, 23, 5, 0, 0, db 0, -1, 8, 27, 24, 6, 0, 0, db 0, -1, 7, 26, 26, 7, -1, 0, db 0, 0, 6, 24, 27, 8, -1, 0, db 0, 0, 5, 23, 28, 8, 0, 0, db 0, 0, 4, 22, 29, 9, 0, 0, db 0, 0, 3, 21, 30, 10, 0, 0, db 0, 0, 2, 20, 31, 11, 0, 0, db 0, 0, 2, 18, 31, 13, 0, 0, db 0, 0, 1, 17, 31, 14, 1, 0, db -1, 1, -3, 63, 4, -1, 1, 0, ; SHARP db -1, 3, -6, 62, 8, -3, 2, -1, db -1, 4, -9, 60, 13, -5, 3, -1, db -2, 5, -11, 58, 19, -7, 3, -1, db -2, 5, -11, 54, 24, -9, 4, -1, db -2, 5, -12, 50, 30, -10, 4, -1, db -2, 5, -12, 45, 35, -11, 5, -1, db -2, 6, -12, 40, 40, -12, 6, -2, db -1, 5, -11, 35, 45, -12, 5, -2, db -1, 4, -10, 30, 50, -12, 5, -2, db -1, 4, -9, 24, 54, -11, 5, -2, db -1, 3, -7, 19, 58, -11, 5, -2, db -1, 3, -5, 13, 60, -9, 4, -1, db -1, 2, -3, 8, 62, -6, 3, -1, db 0, 1, -1, 4, 63, -3, 1, -1, db 0, 0, -2, 63, 4, -1, 0, 0, ; REGULAR 4 db 0, 0, -4, 61, 9, -2, 0, 0, db 0, 0, -5, 58, 14, -3, 0, 0, db 0, 0, -6, 55, 19, -4, 0, 0, db 0, 0, -6, 51, 24, -5, 0, 0, db 0, 0, -7, 47, 29, -5, 0, 0, db 0, 0, -6, 42, 33, -5, 0, 0, db 0, 0, -6, 38, 38, -6, 0, 0, db 0, 0, -5, 33, 42, -6, 0, 0, db 0, 0, -5, 29, 47, -7, 0, 0, db 0, 0, -5, 24, 51, -6, 0, 0, db 0, 0, -4, 19, 55, -6, 0, 0, db 0, 0, -3, 14, 58, -5, 0, 0, db 0, 0, -2, 9, 61, -4, 0, 0, db 0, 0, -1, 4, 63, -2, 0, 0, db 0, 0, 15, 31, 17, 1, 0, 0, ; SMOOTH 4 db 0, 0, 13, 31, 18, 2, 0, 0, db 0, 0, 11, 31, 20, 2, 0, 0, db 0, 0, 10, 30, 21, 3, 0, 0, db 0, 0, 9, 29, 22, 4, 0, 0, db 0, 0, 8, 28, 23, 5, 0, 0, db 0, 0, 7, 27, 24, 6, 0, 0, db 0, 0, 6, 26, 26, 6, 0, 0, db 0, 0, 6, 24, 27, 7, 0, 0, db 0, 0, 5, 23, 28, 8, 0, 0, db 0, 0, 4, 22, 29, 9, 0, 0, db 0, 0, 3, 21, 30, 10, 0, 0, db 0, 0, 2, 20, 31, 11, 0, 0, db 0, 0, 2, 18, 31, 13, 0, 0, db 0, 0, 1, 17, 31, 15, 0, 0 align 16, db 0 const filter_intra_taps, db -6, 10, -5, 2, -3, 1, -3, 1, ; 0 db -4, 6, -3, 2, -3, 2, -3, 1, db 0, 0, 10, 0, 1, 10, 1, 2, db 0, 0, 6, 0, 2, 6, 2, 2, db 0, 12, 0, 9, 0, 7, 10, 5, db 0, 2, 0, 2, 0, 2, 6, 3, db 0, 0, 0, 0, 0, 0, 0, 0, db 12, 0, 9, 0, 7, 0, 5, 0, db -10, 16, -6, 0, -4, 0, -2, 0, ; 1 db -10, 16, -6, 0, -4, 0, -2, 0, db 0, 0, 16, 0, 0, 16, 0, 0, db 0, 0, 16, 0, 0, 16, 0, 0, db 0, 10, 0, 6, 0, 4, 16, 2, db 0, 0, 0, 0, 0, 0, 16, 0, db 0, 0, 0, 0, 0, 0, 0, 0, db 10, 0, 6, 0, 4, 0, 2, 0, db -8, 8, -8, 0, -8, 0, -8, 0, ; 2 db -4, 4, -4, 0, -4, 0, -4, 0, db 0, 0, 8, 0, 0, 8, 0, 0, db 0, 0, 4, 0, 0, 4, 0, 0, db 0, 16, 0, 16, 0, 16, 8, 16, db 0, 0, 0, 0, 0, 0, 4, 0, db 0, 0, 0, 0, 0, 0, 0, 0, db 16, 0, 16, 0, 16, 0, 16, 0, db -2, 8, -1, 3, -1, 2, 0, 1, ; 3 db -1, 4, -1, 3, -1, 2, -1, 2, db 0, 0, 8, 0, 3, 8, 2, 3, db 0, 0, 4, 0, 3, 4, 2, 3, db 0, 10, 0, 6, 0, 4, 8, 2, db 0, 3, 0, 4, 0, 4, 4, 3, db 0, 0, 0, 0, 0, 0, 0, 0, db 10, 0, 6, 0, 4, 0, 3, 0, db -12, 14, -10, 0, -9, 0, -8, 0, ; 4 db -10, 12, -9, 1, -8, 0, -7, 0, db 0, 0, 14, 0, 0, 14, 0, 0, db 0, 0, 12, 0, 0, 12, 0, 1, db 0, 14, 0, 12, 0, 11, 14, 10, db 0, 0, 0, 0, 0, 1, 12, 1, db 0, 0, 0, 0, 0, 0, 0, 0, db 14, 0, 12, 0, 11, 0, 9, 0 align 16, db 0 const sgr_x_by_x, db 255, 128, 85, 64, 51, 43, 37, 32, 28, 26, 23, 21, 20, 18, 17, db 16, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 9, db 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, db 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, db 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, db 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, db 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, db 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, db 0 align 8, db 0 const mc_warp_filter, db 0, 127, 0, 0, 0, 1, 0, 0, 0, 127, 0, 0, -1, 2, 0, 0, ; [-1, 0) db 1, 127, -1, 0, -3, 4, 0, 0, 1, 126, -2, 0, -4, 6, 1, 0, db 1, 126, -3, 0, -5, 8, 1, 0, 1, 125, -4, 0, -6, 11, 1, 0, db 1, 124, -4, 0, -7, 13, 1, 0, 2, 123, -5, 0, -8, 15, 1, 0, db 2, 122, -6, 0, -9, 18, 1, 0, 2, 121, -6, 0, -10, 20, 1, 0, db 2, 120, -7, 0, -11, 22, 2, 0, 2, 119, -8, 0, -12, 25, 2, 0, db 3, 117, -8, 0, -13, 27, 2, 0, 3, 116, -9, 0, -13, 29, 2, 0, db 3, 114, -10, 0, -14, 32, 3, 0, 3, 113, -10, 0, -15, 35, 2, 0, db 3, 111, -11, 0, -15, 37, 3, 0, 3, 109, -11, 0, -16, 40, 3, 0, db 3, 108, -12, 0, -16, 42, 3, 0, 4, 106, -13, 0, -17, 45, 3, 0, db 4, 104, -13, 0, -17, 47, 3, 0, 4, 102, -14, 0, -17, 50, 3, 0, db 4, 100, -14, 0, -17, 52, 3, 0, 4, 98, -15, 0, -18, 55, 4, 0, db 4, 96, -15, 0, -18, 58, 3, 0, 4, 94, -16, 0, -18, 60, 4, 0, db 4, 91, -16, 0, -18, 63, 4, 0, 4, 89, -16, 0, -18, 65, 4, 0, db 4, 87, -17, 0, -18, 68, 4, 0, 4, 85, -17, 0, -18, 70, 4, 0, db 4, 82, -17, 0, -18, 73, 4, 0, 4, 80, -17, 0, -18, 75, 4, 0, db 4, 78, -18, 0, -18, 78, 4, 0, 4, 75, -18, 0, -17, 80, 4, 0, db 4, 73, -18, 0, -17, 82, 4, 0, 4, 70, -18, 0, -17, 85, 4, 0, db 4, 68, -18, 0, -17, 87, 4, 0, 4, 65, -18, 0, -16, 89, 4, 0, db 4, 63, -18, 0, -16, 91, 4, 0, 4, 60, -18, 0, -16, 94, 4, 0, db 3, 58, -18, 0, -15, 96, 4, 0, 4, 55, -18, 0, -15, 98, 4, 0, db 3, 52, -17, 0, -14, 100, 4, 0, 3, 50, -17, 0, -14, 102, 4, 0, db 3, 47, -17, 0, -13, 104, 4, 0, 3, 45, -17, 0, -13, 106, 4, 0, db 3, 42, -16, 0, -12, 108, 3, 0, 3, 40, -16, 0, -11, 109, 3, 0, db 3, 37, -15, 0, -11, 111, 3, 0, 2, 35, -15, 0, -10, 113, 3, 0, db 3, 32, -14, 0, -10, 114, 3, 0, 2, 29, -13, 0, -9, 116, 3, 0, db 2, 27, -13, 0, -8, 117, 3, 0, 2, 25, -12, 0, -8, 119, 2, 0, db 2, 22, -11, 0, -7, 120, 2, 0, 1, 20, -10, 0, -6, 121, 2, 0, db 1, 18, -9, 0, -6, 122, 2, 0, 1, 15, -8, 0, -5, 123, 2, 0, db 1, 13, -7, 0, -4, 124, 1, 0, 1, 11, -6, 0, -4, 125, 1, 0, db 1, 8, -5, 0, -3, 126, 1, 0, 1, 6, -4, 0, -2, 126, 1, 0, db 0, 4, -3, 0, -1, 127, 1, 0, 0, 2, -1, 0, 0, 127, 0, 0, db 0, 0, 1, 0, 0, 127, 0, 0, 0, -1, 2, 0, 0, 127, 0, 0, ; [0, 1) db 0, -3, 4, 1, 1, 127, -2, 0, 0, -5, 6, 1, 1, 127, -2, 0, db 0, -6, 8, 1, 2, 126, -3, 0, -1, -7, 11, 2, 2, 126, -4, -1, db -1, -8, 13, 2, 3, 125, -5, -1, -1, -10, 16, 3, 3, 124, -6, -1, db -1, -11, 18, 3, 4, 123, -7, -1, -1, -12, 20, 3, 4, 122, -7, -1, db -1, -13, 23, 3, 4, 121, -8, -1, -2, -14, 25, 4, 5, 120, -9, -1, db -1, -15, 27, 4, 5, 119, -10, -1, -1, -16, 30, 4, 5, 118, -11, -1, db -2, -17, 33, 5, 6, 116, -12, -1, -2, -17, 35, 5, 6, 114, -12, -1, db -2, -18, 38, 5, 6, 113, -13, -1, -2, -19, 41, 6, 7, 111, -14, -2, db -2, -19, 43, 6, 7, 110, -15, -2, -2, -20, 46, 6, 7, 108, -15, -2, db -2, -20, 49, 6, 7, 106, -16, -2, -2, -21, 51, 7, 7, 104, -16, -2, db -2, -21, 54, 7, 7, 102, -17, -2, -2, -21, 56, 7, 8, 100, -18, -2, db -2, -22, 59, 7, 8, 98, -18, -2, -2, -22, 62, 7, 8, 96, -19, -2, db -2, -22, 64, 7, 8, 94, -19, -2, -2, -22, 67, 8, 8, 91, -20, -2, db -2, -22, 69, 8, 8, 89, -20, -2, -2, -22, 72, 8, 8, 87, -21, -2, db -2, -21, 74, 8, 8, 84, -21, -2, -2, -22, 77, 8, 8, 82, -21, -2, db -2, -21, 79, 8, 8, 79, -21, -2, -2, -21, 82, 8, 8, 77, -22, -2, db -2, -21, 84, 8, 8, 74, -21, -2, -2, -21, 87, 8, 8, 72, -22, -2, db -2, -20, 89, 8, 8, 69, -22, -2, -2, -20, 91, 8, 8, 67, -22, -2, db -2, -19, 94, 8, 7, 64, -22, -2, -2, -19, 96, 8, 7, 62, -22, -2, db -2, -18, 98, 8, 7, 59, -22, -2, -2, -18, 100, 8, 7, 56, -21, -2, db -2, -17, 102, 7, 7, 54, -21, -2, -2, -16, 104, 7, 7, 51, -21, -2, db -2, -16, 106, 7, 6, 49, -20, -2, -2, -15, 108, 7, 6, 46, -20, -2, db -2, -15, 110, 7, 6, 43, -19, -2, -2, -14, 111, 7, 6, 41, -19, -2, db -1, -13, 113, 6, 5, 38, -18, -2, -1, -12, 114, 6, 5, 35, -17, -2, db -1, -12, 116, 6, 5, 33, -17, -2, -1, -11, 118, 5, 4, 30, -16, -1, db -1, -10, 119, 5, 4, 27, -15, -1, -1, -9, 120, 5, 4, 25, -14, -2, db -1, -8, 121, 4, 3, 23, -13, -1, -1, -7, 122, 4, 3, 20, -12, -1, db -1, -7, 123, 4, 3, 18, -11, -1, -1, -6, 124, 3, 3, 16, -10, -1, db -1, -5, 125, 3, 2, 13, -8, -1, -1, -4, 126, 2, 2, 11, -7, -1, db 0, -3, 126, 2, 1, 8, -6, 0, 0, -2, 127, 1, 1, 6, -5, 0, db 0, -2, 127, 1, 1, 4, -3, 0, 0, 0, 127, 0, 0, 2, -1, 0, db 0, 0, 127, 0, 0, 1, 0, 0, 0, 0, 127, 0, 0, -1, 2, 0, ; [1, 2) db 0, 1, 127, -1, 0, -3, 4, 0, 0, 1, 126, -2, 0, -4, 6, 1, db 0, 1, 126, -3, 0, -5, 8, 1, 0, 1, 125, -4, 0, -6, 11, 1, db 0, 1, 124, -4, 0, -7, 13, 1, 0, 2, 123, -5, 0, -8, 15, 1, db 0, 2, 122, -6, 0, -9, 18, 1, 0, 2, 121, -6, 0, -10, 20, 1, db 0, 2, 120, -7, 0, -11, 22, 2, 0, 2, 119, -8, 0, -12, 25, 2, db 0, 3, 117, -8, 0, -13, 27, 2, 0, 3, 116, -9, 0, -13, 29, 2, db 0, 3, 114, -10, 0, -14, 32, 3, 0, 3, 113, -10, 0, -15, 35, 2, db 0, 3, 111, -11, 0, -15, 37, 3, 0, 3, 109, -11, 0, -16, 40, 3, db 0, 3, 108, -12, 0, -16, 42, 3, 0, 4, 106, -13, 0, -17, 45, 3, db 0, 4, 104, -13, 0, -17, 47, 3, 0, 4, 102, -14, 0, -17, 50, 3, db 0, 4, 100, -14, 0, -17, 52, 3, 0, 4, 98, -15, 0, -18, 55, 4, db 0, 4, 96, -15, 0, -18, 58, 3, 0, 4, 94, -16, 0, -18, 60, 4, db 0, 4, 91, -16, 0, -18, 63, 4, 0, 4, 89, -16, 0, -18, 65, 4, db 0, 4, 87, -17, 0, -18, 68, 4, 0, 4, 85, -17, 0, -18, 70, 4, db 0, 4, 82, -17, 0, -18, 73, 4, 0, 4, 80, -17, 0, -18, 75, 4, db 0, 4, 78, -18, 0, -18, 78, 4, 0, 4, 75, -18, 0, -17, 80, 4, db 0, 4, 73, -18, 0, -17, 82, 4, 0, 4, 70, -18, 0, -17, 85, 4, db 0, 4, 68, -18, 0, -17, 87, 4, 0, 4, 65, -18, 0, -16, 89, 4, db 0, 4, 63, -18, 0, -16, 91, 4, 0, 4, 60, -18, 0, -16, 94, 4, db 0, 3, 58, -18, 0, -15, 96, 4, 0, 4, 55, -18, 0, -15, 98, 4, db 0, 3, 52, -17, 0, -14, 100, 4, 0, 3, 50, -17, 0, -14, 102, 4, db 0, 3, 47, -17, 0, -13, 104, 4, 0, 3, 45, -17, 0, -13, 106, 4, db 0, 3, 42, -16, 0, -12, 108, 3, 0, 3, 40, -16, 0, -11, 109, 3, db 0, 3, 37, -15, 0, -11, 111, 3, 0, 2, 35, -15, 0, -10, 113, 3, db 0, 3, 32, -14, 0, -10, 114, 3, 0, 2, 29, -13, 0, -9, 116, 3, db 0, 2, 27, -13, 0, -8, 117, 3, 0, 2, 25, -12, 0, -8, 119, 2, db 0, 2, 22, -11, 0, -7, 120, 2, 0, 1, 20, -10, 0, -6, 121, 2, db 0, 1, 18, -9, 0, -6, 122, 2, 0, 1, 15, -8, 0, -5, 123, 2, db 0, 1, 13, -7, 0, -4, 124, 1, 0, 1, 11, -6, 0, -4, 125, 1, db 0, 1, 8, -5, 0, -3, 126, 1, 0, 1, 6, -4, 0, -2, 126, 1, db 0, 0, 4, -3, 0, -1, 127, 1, 0, 0, 2, -1, 0, 0, 127, 0, db 0, 0, 2, -1, 0, 0, 127, 0 ; dummy (replicate row index 191) ; Values that are 0 will never be used align 2, db 0 const dr_intra_derivative, dw 0, ; Angles: dw 1023, 0, ; 3, 93, 183 dw 547, ; 6, 96, 186 dw 372, 0, 0, ; 9, 99, 189 dw 273, ; 14, 104, 194 dw 215, 0, ; 17, 107, 197 dw 178, ; 20, 110, 200 dw 151, 0, ; 23, 113, 203 (113 & 203 are base angles) dw 132, ; 26, 116, 206 dw 116, 0, ; 29, 119, 209 dw 102, 0, ; 32, 122, 212 dw 90, ; 36, 126, 216 dw 80, 0, ; 39, 129, 219 dw 71, ; 42, 132, 222 dw 64, 0, ; 45, 135, 225 (45 & 135 are base angles) dw 57, ; 48, 138, 228 dw 51, 0, ; 51, 141, 231 dw 45, 0, ; 54, 144, 234 dw 40, ; 58, 148, 238 dw 35, 0, ; 61, 151, 241 dw 31, ; 64, 154, 244 dw 27, 0, ; 67, 157, 247 (67 & 157 are base angles) dw 23, ; 70, 160, 250 dw 19, 0, ; 73, 163, 253 dw 15, 0, ; 76, 166, 256 dw 11, 0, ; 81, 171, 261 dw 7, ; 84, 174, 264 dw 3 ; 87, 177, 267 ; Taken from the spec. Range is [-2048, 2047], mean is 0 and stddev is 512 align 2, db 0 const gaussian_sequence, dw 56, 568, -180, 172, 124, -84, 172, -64, -900, 24, 820, dw 224, 1248, 996, 272, -8, -916, -388, -732, -104, -188, 800, dw 112, -652, -320, -376, 140, -252, 492, -168, 44, -788, 588, dw -584, 500, -228, 12, 680, 272, -476, 972, -100, 652, 368, dw 432, -196, -720, -192, 1000, -332, 652, -136, -552, -604, -4, dw 192, -220, -136, 1000, -52, 372, -96, -624, 124, -24, 396, dw 540, -12, -104, 640, 464, 244, -208, -84, 368, -528, -740, dw 248, -968, -848, 608, 376, -60, -292, -40, -156, 252, -292, dw 248, 224, -280, 400, -244, 244, -60, 76, -80, 212, 532, dw 340, 128, -36, 824, -352, -60, -264, -96, -612, 416, -704, dw 220, -204, 640, -160, 1220, -408, 900, 336, 20, -336, -96, dw -792, 304, 48, -28, -1232, -1172, -448, 104, -292, -520, 244, dw 60, -948, 0, -708, 268, 108, 356, -548, 488, -344, -136, dw 488, -196, -224, 656, -236, -1128, 60, 4, 140, 276, -676, dw -376, 168, -108, 464, 8, 564, 64, 240, 308, -300, -400, dw -456, -136, 56, 120, -408, -116, 436, 504, -232, 328, 844, dw -164, -84, 784, -168, 232, -224, 348, -376, 128, 568, 96, dw -1244, -288, 276, 848, 832, -360, 656, 464, -384, -332, -356, dw 728, -388, 160, -192, 468, 296, 224, 140, -776, -100, 280, dw 4, 196, 44, -36, -648, 932, 16, 1428, 28, 528, 808, dw 772, 20, 268, 88, -332, -284, 124, -384, -448, 208, -228, dw -1044, -328, 660, 380, -148, -300, 588, 240, 540, 28, 136, dw -88, -436, 256, 296, -1000, 1400, 0, -48, 1056, -136, 264, dw -528, -1108, 632, -484, -592, -344, 796, 124, -668, -768, 388, dw 1296, -232, -188, -200, -288, -4, 308, 100, -168, 256, -500, dw 204, -508, 648, -136, 372, -272, -120, -1004, -552, -548, -384, dw 548, -296, 428, -108, -8, -912, -324, -224, -88, -112, -220, dw -100, 996, -796, 548, 360, -216, 180, 428, -200, -212, 148, dw 96, 148, 284, 216, -412, -320, 120, -300, -384, -604, -572, dw -332, -8, -180, -176, 696, 116, -88, 628, 76, 44, -516, dw 240, -208, -40, 100, -592, 344, -308, -452, -228, 20, 916, dw -1752, -136, -340, -804, 140, 40, 512, 340, 248, 184, -492, dw 896, -156, 932, -628, 328, -688, -448, -616, -752, -100, 560, dw -1020, 180, -800, -64, 76, 576, 1068, 396, 660, 552, -108, dw -28, 320, -628, 312, -92, -92, -472, 268, 16, 560, 516, dw -672, -52, 492, -100, 260, 384, 284, 292, 304, -148, 88, dw -152, 1012, 1064, -228, 164, -376, -684, 592, -392, 156, 196, dw -524, -64, -884, 160, -176, 636, 648, 404, -396, -436, 864, dw 424, -728, 988, -604, 904, -592, 296, -224, 536, -176, -920, dw 436, -48, 1176, -884, 416, -776, -824, -884, 524, -548, -564, dw -68, -164, -96, 692, 364, -692, -1012, -68, 260, -480, 876, dw -1116, 452, -332, -352, 892, -1088, 1220, -676, 12, -292, 244, dw 496, 372, -32, 280, 200, 112, -440, -96, 24, -644, -184, dw 56, -432, 224, -980, 272, -260, 144, -436, 420, 356, 364, dw -528, 76, 172, -744, -368, 404, -752, -416, 684, -688, 72, dw 540, 416, 92, 444, 480, -72, -1416, 164, -1172, -68, 24, dw 424, 264, 1040, 128, -912, -524, -356, 64, 876, -12, 4, dw -88, 532, 272, -524, 320, 276, -508, 940, 24, -400, -120, dw 756, 60, 236, -412, 100, 376, -484, 400, -100, -740, -108, dw -260, 328, -268, 224, -200, -416, 184, -604, -564, -20, 296, dw 60, 892, -888, 60, 164, 68, -760, 216, -296, 904, -336, dw -28, 404, -356, -568, -208, -1480, -512, 296, 328, -360, -164, dw -1560, -776, 1156, -428, 164, -504, -112, 120, -216, -148, -264, dw 308, 32, 64, -72, 72, 116, 176, -64, -272, 460, -536, dw -784, -280, 348, 108, -752, -132, 524, -540, -776, 116, -296, dw -1196, -288, -560, 1040, -472, 116, -848, -1116, 116, 636, 696, dw 284, -176, 1016, 204, -864, -648, -248, 356, 972, -584, -204, dw 264, 880, 528, -24, -184, 116, 448, -144, 828, 524, 212, dw -212, 52, 12, 200, 268, -488, -404, -880, 824, -672, -40, dw 908, -248, 500, 716, -576, 492, -576, 16, 720, -108, 384, dw 124, 344, 280, 576, -500, 252, 104, -308, 196, -188, -8, dw 1268, 296, 1032, -1196, 436, 316, 372, -432, -200, -660, 704, dw -224, 596, -132, 268, 32, -452, 884, 104, -1008, 424, -1348, dw -280, 4, -1168, 368, 476, 696, 300, -8, 24, 180, -592, dw -196, 388, 304, 500, 724, -160, 244, -84, 272, -256, -420, dw 320, 208, -144, -156, 156, 364, 452, 28, 540, 316, 220, dw -644, -248, 464, 72, 360, 32, -388, 496, -680, -48, 208, dw -116, -408, 60, -604, -392, 548, -840, 784, -460, 656, -544, dw -388, -264, 908, -800, -628, -612, -568, 572, -220, 164, 288, dw -16, -308, 308, -112, -636, -760, 280, -668, 432, 364, 240, dw -196, 604, 340, 384, 196, 592, -44, -500, 432, -580, -132, dw 636, -76, 392, 4, -412, 540, 508, 328, -356, -36, 16, dw -220, -64, -248, -60, 24, -192, 368, 1040, 92, -24, -1044, dw -32, 40, 104, 148, 192, -136, -520, 56, -816, -224, 732, dw 392, 356, 212, -80, -424, -1008, -324, 588, -1496, 576, 460, dw -816, -848, 56, -580, -92, -1372, -112, -496, 200, 364, 52, dw -140, 48, -48, -60, 84, 72, 40, 132, -356, -268, -104, dw -284, -404, 732, -520, 164, -304, -540, 120, 328, -76, -460, dw 756, 388, 588, 236, -436, -72, -176, -404, -316, -148, 716, dw -604, 404, -72, -88, -888, -68, 944, 88, -220, -344, 960, dw 472, 460, -232, 704, 120, 832, -228, 692, -508, 132, -476, dw 844, -748, -364, -44, 1116, -1104, -1056, 76, 428, 552, -692, dw 60, 356, 96, -384, -188, -612, -576, 736, 508, 892, 352, dw -1132, 504, -24, -352, 324, 332, -600, -312, 292, 508, -144, dw -8, 484, 48, 284, -260, -240, 256, -100, -292, -204, -44, dw 472, -204, 908, -188, -1000, -256, 92, 1164, -392, 564, 356, dw 652, -28, -884, 256, 484, -192, 760, -176, 376, -524, -452, dw -436, 860, -736, 212, 124, 504, -476, 468, 76, -472, 552, dw -692, -944, -620, 740, -240, 400, 132, 20, 192, -196, 264, dw -668, -1012, -60, 296, -316, -828, 76, -156, 284, -768, -448, dw -832, 148, 248, 652, 616, 1236, 288, -328, -400, -124, 588, dw 220, 520, -696, 1032, 768, -740, -92, -272, 296, 448, -464, dw 412, -200, 392, 440, -200, 264, -152, -260, 320, 1032, 216, dw 320, -8, -64, 156, -1016, 1084, 1172, 536, 484, -432, 132, dw 372, -52, -256, 84, 116, -352, 48, 116, 304, -384, 412, dw 924, -300, 528, 628, 180, 648, 44, -980, -220, 1320, 48, dw 332, 748, 524, -268, -720, 540, -276, 564, -344, -208, -196, dw 436, 896, 88, -392, 132, 80, -964, -288, 568, 56, -48, dw -456, 888, 8, 552, -156, -292, 948, 288, 128, -716, -292, dw 1192, -152, 876, 352, -600, -260, -812, -468, -28, -120, -32, dw -44, 1284, 496, 192, 464, 312, -76, -516, -380, -456, -1012, dw -48, 308, -156, 36, 492, -156, -808, 188, 1652, 68, -120, dw -116, 316, 160, -140, 352, 808, -416, 592, 316, -480, 56, dw 528, -204, -568, 372, -232, 752, -344, 744, -4, 324, -416, dw -600, 768, 268, -248, -88, -132, -420, -432, 80, -288, 404, dw -316, -1216, -588, 520, -108, 92, -320, 368, -480, -216, -92, dw 1688, -300, 180, 1020, -176, 820, -68, -228, -260, 436, -904, dw 20, 40, -508, 440, -736, 312, 332, 204, 760, -372, 728, dw 96, -20, -632, -520, -560, 336, 1076, -64, -532, 776, 584, dw 192, 396, -728, -520, 276, -188, 80, -52, -612, -252, -48, dw 648, 212, -688, 228, -52, -260, 428, -412, -272, -404, 180, dw 816, -796, 48, 152, 484, -88, -216, 988, 696, 188, -528, dw 648, -116, -180, 316, 476, 12, -564, 96, 476, -252, -364, dw -376, -392, 556, -256, -576, 260, -352, 120, -16, -136, -260, dw -492, 72, 556, 660, 580, 616, 772, 436, 424, -32, -324, dw -1268, 416, -324, -80, 920, 160, 228, 724, 32, -516, 64, dw 384, 68, -128, 136, 240, 248, -204, -68, 252, -932, -120, dw -480, -628, -84, 192, 852, -404, -288, -132, 204, 100, 168, dw -68, -196, -868, 460, 1080, 380, -80, 244, 0, 484, -888, dw 64, 184, 352, 600, 460, 164, 604, -196, 320, -64, 588, dw -184, 228, 12, 372, 48, -848, -344, 224, 208, -200, 484, dw 128, -20, 272, -468, -840, 384, 256, -720, -520, -464, -580, dw 112, -120, 644, -356, -208, -608, -528, 704, 560, -424, 392, dw 828, 40, 84, 200, -152, 0, -144, 584, 280, -120, 80, dw -556, -972, -196, -472, 724, 80, 168, -32, 88, 160, -688, dw 0, 160, 356, 372, -776, 740, -128, 676, -248, -480, 4, dw -364, 96, 544, 232, -1032, 956, 236, 356, 20, -40, 300, dw 24, -676, -596, 132, 1120, -104, 532, -1096, 568, 648, 444, dw 508, 380, 188, -376, -604, 1488, 424, 24, 756, -220, -192, dw 716, 120, 920, 688, 168, 44, -460, 568, 284, 1144, 1160, dw 600, 424, 888, 656, -356, -320, 220, 316, -176, -724, -188, dw -816, -628, -348, -228, -380, 1012, -452, -660, 736, 928, 404, dw -696, -72, -268, -892, 128, 184, -344, -780, 360, 336, 400, dw 344, 428, 548, -112, 136, -228, -216, -820, -516, 340, 92, dw -136, 116, -300, 376, -244, 100, -316, -520, -284, -12, 824, dw 164, -548, -180, -128, 116, -924, -828, 268, -368, -580, 620, dw 192, 160, 0, -1676, 1068, 424, -56, -360, 468, -156, 720, dw 288, -528, 556, -364, 548, -148, 504, 316, 152, -648, -620, dw -684, -24, -376, -384, -108, -920, -1032, 768, 180, -264, -508, dw -1268, -260, -60, 300, -240, 988, 724, -376, -576, -212, -736, dw 556, 192, 1092, -620, -880, 376, -56, -4, -216, -32, 836, dw 268, 396, 1332, 864, -600, 100, 56, -412, -92, 356, 180, dw 884, -468, -436, 292, -388, -804, -704, -840, 368, -348, 140, dw -724, 1536, 940, 372, 112, -372, 436, -480, 1136, 296, -32, dw -228, 132, -48, -220, 868, -1016, -60, -1044, -464, 328, 916, dw 244, 12, -736, -296, 360, 468, -376, -108, -92, 788, 368, dw -56, 544, 400, -672, -420, 728, 16, 320, 44, -284, -380, dw -796, 488, 132, 204, -596, -372, 88, -152, -908, -636, -572, dw -624, -116, -692, -200, -56, 276, -88, 484, -324, 948, 864, dw 1000, -456, -184, -276, 292, -296, 156, 676, 320, 160, 908, dw -84, -1236, -288, -116, 260, -372, -644, 732, -756, -96, 84, dw 344, -520, 348, -688, 240, -84, 216, -1044, -136, -676, -396, dw -1500, 960, -40, 176, 168, 1516, 420, -504, -344, -364, -360, dw 1216, -940, -380, -212, 252, -660, -708, 484, -444, -152, 928, dw -120, 1112, 476, -260, 560, -148, -344, 108, -196, 228, -288, dw 504, 560, -328, -88, 288, -1008, 460, -228, 468, -836, -196, dw 76, 388, 232, 412, -1168, -716, -644, 756, -172, -356, -504, dw 116, 432, 528, 48, 476, -168, -608, 448, 160, -532, -272, dw 28, -676, -12, 828, 980, 456, 520, 104, -104, 256, -344, dw -4, -28, -368, -52, -524, -572, -556, -200, 768, 1124, -208, dw -512, 176, 232, 248, -148, -888, 604, -600, -304, 804, -156, dw -212, 488, -192, -804, -256, 368, -360, -916, -328, 228, -240, dw -448, -472, 856, -556, -364, 572, -12, -156, -368, -340, 432, dw 252, -752, -152, 288, 268, -580, -848, -592, 108, -76, 244, dw 312, -716, 592, -80, 436, 360, 4, -248, 160, 516, 584, dw 732, 44, -468, -280, -292, -156, -588, 28, 308, 912, 24, dw 124, 156, 180, -252, 944, -924, -772, -520, -428, -624, 300, dw -212, -1144, 32, -724, 800, -1128, -212, -1288, -848, 180, -416, dw 440, 192, -576, -792, -76, -1080, 80, -532, -352, -132, 380, dw -820, 148, 1112, 128, 164, 456, 700, -924, 144, -668, -384, dw 648, -832, 508, 552, -52, -100, -656, 208, -568, 748, -88, dw 680, 232, 300, 192, -408, -1012, -152, -252, -268, 272, -876, dw -664, -648, -332, -136, 16, 12, 1152, -28, 332, -536, 320, dw -672, -460, -316, 532, -260, 228, -40, 1052, -816, 180, 88, dw -496, -556, -672, -368, 428, 92, 356, 404, -408, 252, 196, dw -176, -556, 792, 268, 32, 372, 40, 96, -332, 328, 120, dw 372, -900, -40, 472, -264, -592, 952, 128, 656, 112, 664, dw -232, 420, 4, -344, -464, 556, 244, -416, -32, 252, 0, dw -412, 188, -696, 508, -476, 324, -1096, 656, -312, 560, 264, dw -136, 304, 160, -64, -580, 248, 336, -720, 560, -348, -288, dw -276, -196, -500, 852, -544, -236, -1128, -992, -776, 116, 56, dw 52, 860, 884, 212, -12, 168, 1020, 512, -552, 924, -148, dw 716, 188, 164, -340, -520, -184, 880, -152, -680, -208, -1156, dw -300, -528, -472, 364, 100, -744, -1056, -32, 540, 280, 144, dw -676, -32, -232, -280, -224, 96, 568, -76, 172, 148, 148, dw 104, 32, -296, -32, 788, -80, 32, -16, 280, 288, 944, dw 428, -484 align 8, db 0 const resize_filter, db 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 1, -128, -2, 1, 0, 0, db 0, -1, 3, -127, -4, 2, -1, 0, 0, -1, 4, -127, -6, 3, -1, 0, db 0, -2, 6, -126, -8, 3, -1, 0, 0, -2, 7, -125, -11, 4, -1, 0, db 1, -2, 8, -125, -13, 5, -2, 0, 1, -3, 9, -124, -15, 6, -2, 0, db 1, -3, 10, -123, -18, 6, -2, 1, 1, -3, 11, -122, -20, 7, -3, 1, db 1, -4, 12, -121, -22, 8, -3, 1, 1, -4, 13, -120, -25, 9, -3, 1, db 1, -4, 14, -118, -28, 9, -3, 1, 1, -4, 15, -117, -30, 10, -4, 1, db 1, -5, 16, -116, -32, 11, -4, 1, 1, -5, 16, -114, -35, 12, -4, 1, db 1, -5, 17, -112, -38, 12, -4, 1, 1, -5, 18, -111, -40, 13, -5, 1, db 1, -5, 18, -109, -43, 14, -5, 1, 1, -6, 19, -107, -45, 14, -5, 1, db 1, -6, 19, -105, -48, 15, -5, 1, 1, -6, 19, -103, -51, 16, -5, 1, db 1, -6, 20, -101, -53, 16, -6, 1, 1, -6, 20, -99, -56, 17, -6, 1, db 1, -6, 20, -97, -58, 17, -6, 1, 1, -6, 20, -95, -61, 18, -6, 1, db 2, -7, 20, -93, -64, 18, -6, 2, 2, -7, 20, -91, -66, 19, -6, 1, db 2, -7, 20, -88, -69, 19, -6, 1, 2, -7, 20, -86, -71, 19, -6, 1, db 2, -7, 20, -84, -74, 20, -7, 2, 2, -7, 20, -81, -76, 20, -7, 1, db 2, -7, 20, -79, -79, 20, -7, 2, 1, -7, 20, -76, -81, 20, -7, 2, db 2, -7, 20, -74, -84, 20, -7, 2, 1, -6, 19, -71, -86, 20, -7, 2, db 1, -6, 19, -69, -88, 20, -7, 2, 1, -6, 19, -66, -91, 20, -7, 2, db 2, -6, 18, -64, -93, 20, -7, 2, 1, -6, 18, -61, -95, 20, -6, 1, db 1, -6, 17, -58, -97, 20, -6, 1, 1, -6, 17, -56, -99, 20, -6, 1, db 1, -6, 16, -53, -101, 20, -6, 1, 1, -5, 16, -51, -103, 19, -6, 1, db 1, -5, 15, -48, -105, 19, -6, 1, 1, -5, 14, -45, -107, 19, -6, 1, db 1, -5, 14, -43, -109, 18, -5, 1, 1, -5, 13, -40, -111, 18, -5, 1, db 1, -4, 12, -38, -112, 17, -5, 1, 1, -4, 12, -35, -114, 16, -5, 1, db 1, -4, 11, -32, -116, 16, -5, 1, 1, -4, 10, -30, -117, 15, -4, 1, db 1, -3, 9, -28, -118, 14, -4, 1, 1, -3, 9, -25, -120, 13, -4, 1, db 1, -3, 8, -22, -121, 12, -4, 1, 1, -3, 7, -20, -122, 11, -3, 1, db 1, -2, 6, -18, -123, 10, -3, 1, 0, -2, 6, -15, -124, 9, -3, 1, db 0, -2, 5, -13, -125, 8, -2, 1, 0, -1, 4, -11, -125, 7, -2, 0, db 0, -1, 3, -8, -126, 6, -2, 0, 0, -1, 3, -6, -127, 4, -1, 0, db 0, -1, 2, -4, -127, 3, -1, 0, 0, 0, 1, -2, -128, 1, 0, 0,
oldstuff/tigcc/PolySnd/sources/statique/Sample_voice1.asm
bcherry/bcherry
3
245623
section ".data" xdef pSnd_Sample_voice1 pSnd_Sample_voice1: move.w d0,wav_sample_voice1 rts
programs/oeis/030/A030004.asm
neoneye/loda
22
244252
; A030004: (prime(n)-1)(prime(n)-3)(prime(n)-5)/48. ; 0,0,1,10,20,56,84,165,364,455,816,1140,1330,1771,2600,3654,4060,5456,6545,7140,9139,10660,13244,17296,19600,20825,23426,24804,27720,39711,43680,50116,52394,64824,67525,76076,85320,91881,102340,113564,117480,138415,142880,152096,156849,187460,221815,234136,240464,253460,273819,280840,317750,341376,366145,392084,400995,428536,447580,457310,508080,585276,608685,620620,644956,735130,776216,848046,862924,893200,939929,1004731,1055240,1107414,1143135,1198144,1274196,1313400,1394204,1499784,1521520,1633355,1656360,1726669,1774630,1848224,1949476,2001460,2027795,2081156,2246839,2362041,2421090,2542124,2604125,2699004,2895620,2929290,3244140,3353896 seq $0,98090 ; Numbers k such that 2k-3 is prime. sub $0,2 bin $0,3
alloy4fun_models/trashltl/models/4/cNYA6qDCjGJvGbPAk.als
Kaixi26/org.alloytools.alloy
0
1155
<reponame>Kaixi26/org.alloytools.alloy open main pred idcNYA6qDCjGJvGbPAk_prop5 { eventually File' = File-Trash } pred __repair { idcNYA6qDCjGJvGbPAk_prop5 } check __repair { idcNYA6qDCjGJvGbPAk_prop5 <=> prop5o }
agda/PLRTree/Heap.agda
bgbianchi/sorting
6
17519
<filename>agda/PLRTree/Heap.agda module PLRTree.Heap {A : Set}(_≤_ : A → A → Set) where open import PLRTree {A} data _≤*_ : A → PLRTree → Set where lf≤* : (x : A) → x ≤* leaf nd≤* : {t : Tag}{x y : A}{l r : PLRTree} → x ≤ y → x ≤* l → x ≤* r → x ≤* node t y l r data Heap : PLRTree → Set where leaf : Heap leaf node : {t : Tag}{x : A}{l r : PLRTree} → x ≤* l → x ≤* r → Heap l → Heap r → Heap (node t x l r)
src/asis/a4g-contt.adb
My-Colaborations/dynamo
15
30516
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- A 4 G . C O N T T -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2012, Free Software Foundation, Inc. -- -- -- -- ASIS-for-GNAT is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- -- Software Foundation; either version 2, or (at your option) any later -- -- version. ASIS-for-GNAT is distributed in the hope that it will be use- -- -- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- -- -- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -- -- Public License for more details. You should have received a copy of the -- -- GNU General Public License distributed with ASIS-for-GNAT; see file -- -- COPYING. If not, write to the Free Software Foundation, 51 Franklin -- -- Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- -- Software Engineering Laboratory of the Swiss Federal Institute of -- -- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- -- Scientific Research Computer Center of Moscow State University (SRCC -- -- MSU), Russia, with funding partially provided by grants from the Swiss -- -- National Science Foundation and the Swiss Academy of Engineering -- -- Sciences. ASIS-for-GNAT is now maintained by AdaCore. -- -- (http://www.adac<EMAIL>). -- -- -- ------------------------------------------------------------------------------ with Ada.Command_Line; with GNAT.Directory_Operations; with Asis; use Asis; with Asis.Errors; use Asis.Errors; with Asis.Exceptions; use Asis.Exceptions; with Asis.Extensions; use Asis.Extensions; with A4G.A_Debug; use A4G.A_Debug; with A4G.A_Osint; use A4G.A_Osint; with A4G.A_Output; use A4G.A_Output; with A4G.Contt.Dp; use A4G.Contt.Dp; with A4G.Contt.SD; use A4G.Contt.SD; with A4G.Contt.TT; use A4G.Contt.TT; with A4G.Contt.UT; use A4G.Contt.UT; with A4G.Defaults; use A4G.Defaults; with A4G.Vcheck; use A4G.Vcheck; with Namet; use Namet; with Output; use Output; package body A4G.Contt is ------------------------------------------- -- Local Subprograms and Data Structures -- ------------------------------------------- procedure Set_Empty_Context (C : Context_Id); -- Set all the attribute of the Context indicated by C as for a -- Context having no associations (being empty) procedure Set_Predefined_Units; -- Sets in the Unit Table the unit entries corresponding to the predefined -- Ada environment. For now it sets the entries for the package Standard -- and for A_Configuration_Compilation only. procedure Print_Context_Search_Dirs (C : Context_Id; Dir_Kind : Search_Dir_Kinds); -- outputs the list of the directories making up the Dir_Kind search path -- for the context C; is intended to be used to produce a part of the -- Context debug output procedure Process_Dir (Dir_Name : String; Dir_Kind : Search_Dir_Kinds); -- verifies the part of the context association parameter following the -- two leading "-<option>" by checking if it is the name of the -- existing directory. If this check fails, this routine raises -- ASIS_Failed with Status setting as Parameter_Error (as required by -- Asis.Ada_Environmemts.Associate. Otherwise this value is stored in -- a normalized form in some temporary data structures as a part of the -- search path for the current Context. -- -- For now, normalization consists on appending the directory separator -- for the stored name, if Dir_Name does not end with the separator. -- -- To store the search paths for the given context, the Set_Search_Paths -- procedure should be called after processing all the actual for the -- Parameters parameter of Asis.Ada_Environment.Associate query ----------------------------------------------------------------- -- Structures for temporary handling search directories names -- -- during processing the Parameters of the Context Association -- ----------------------------------------------------------------- type Dir_Rec; type Link is access Dir_Rec; type Dir_Rec is record Dir_Name : String_Access; Next : Link; end record; type Dir_List is record First : Link; Last : Link; end record; Source_Dirs : Dir_List; Object_Dirs : Dir_List; Tree_Dirs : Dir_List; Source_Dirs_Count : Natural := 0; Object_Dirs_Count : Natural := 0; Tree_Dirs_Count : Natural := 0; procedure Append_Dir (Dirs : in out Dir_List; Dir : Link); -- appends a new element with the directory name to a directory list GNSA_Source : String_Ptr; -- Temporary variable for storing the source name for GNSA Context, may -- be used for -C1 Context only, multiple-trees Contexts will need some -- general solution Config_File : String_Ptr; -- Here we keep the '-gnatec<file_name> option when processing context -- parameters GnatA_Set : Boolean := False; -- Flag indicating if '-gnatA' option is provided as a Context parameter -- ??? Handling of '-gnatec and -gnatA Context parameters is really awful -- It was added to the rather hard-wired processing of Context parameters -- coded in the very beginning of the ASIS project. This stuff should be -- reimplemented at some point -------------------------- -- Allocate_New_Context -- -------------------------- function Allocate_New_Context return Context_Id is C : Context_Id; begin Contexts.Increment_Last; C := Contexts.Last; Set_Empty_Context (C); return Contexts.Last; end Allocate_New_Context; ---------------- -- Append_Dir -- ---------------- procedure Append_Dir (Dirs : in out Dir_List; Dir : Link) is begin if Dirs.First = null then Dirs.First := Dir; else Dirs.Last.Next := Dir; end if; Dirs.Last := Dir; end Append_Dir; ------------------ -- Context_Info -- ------------------ function Context_Info (C : Context_Id) return String is Cont_Id_Image : constant String := Context_Id'Image (C); First_Digit : Natural; begin for I in Cont_Id_Image'Range loop if Cont_Id_Image (I) /= ' ' then First_Digit := I; exit; end if; end loop; return "ASIS Context " & Cont_Id_Image (First_Digit .. Cont_Id_Image'Last); end Context_Info; --------------- -- Erase_Old -- --------------- procedure Erase_Old (C : Context_Id) is begin -- Old (previously associated) Context Name and Parameter values Free (Contexts.Table (C).Name); Free (Contexts.Table (C).Parameters); Free (Contexts.Table (C).GCC); -- Context search paths Free_Argument_List (Contexts.Table (C).Source_Path); Free_Argument_List (Contexts.Table (C).Object_Path); Free_Argument_List (Contexts.Table (C).Tree_Path); -- Context "-I" options for the compiler Free_Argument_List (Contexts.Table (C).Context_I_Options); -- a list of tree files for C1/CN modes (if any) Free_Argument_List (Contexts.Table (C).Context_Tree_Files); end Erase_Old; -------------- -- Finalize -- -------------- procedure Finalize is begin for C in First_Context_Id .. Contexts.Last loop Finalize (C); end loop; end Finalize; -------------- -- Finalize -- -------------- procedure Finalize (C : Context_Id) is begin Reset_Context (C); if Debug_Lib_Model then Print_Context_Info (C); end if; if Is_Associated (C) then Erase_Old (C); -- probably, some more cleaning up is needed... end if; -- at least we have to put off these flags: Contexts.Table (C).Is_Associated := False; Contexts.Table (C).Is_Opened := False; end Finalize; ---------------------- -- Get_Context_Name -- ---------------------- function Get_Context_Name (C : Context_Id) return String is S : constant String_Access := Contexts.Table (C).Name; begin if S = null then return ""; else return S.all; end if; end Get_Context_Name; ---------------------------- -- Get_Context_Parameters -- ---------------------------- function Get_Context_Parameters (C : Context_Id) return String is S : constant String_Access := Contexts.Table (C).Parameters; begin if S = null then return ""; else return S.all; end if; end Get_Context_Parameters; --------------------- -- Get_Current_Cont -- --------------------- function Get_Current_Cont return Context_Id is begin return Current_Context; end Get_Current_Cont; ---------------------- -- Get_Current_Tree -- ---------------------- function Get_Current_Tree return Tree_Id is begin return Current_Tree; end Get_Current_Tree; ---------- -- Hash -- ---------- function Hash return Hash_Index_Type is subtype Int_1_12 is Int range 1 .. 12; -- Used to avoid when others on case jump below Even_Name_Len : Integer; -- Last even numbered position (used for >12 case) begin -- Special test for 12 (rather than counting on a when others for the -- case statement below) avoids some Ada compilers converting the case -- statement into successive jumps. -- The case of a name longer than 12 characters is handled by taking -- the first 6 odd numbered characters and the last 6 even numbered -- characters if A_Name_Len > 12 then Even_Name_Len := (A_Name_Len) / 2 * 2; return (((((((((((( Character'Pos (A_Name_Buffer (01))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len - 10))) * 2 + Character'Pos (A_Name_Buffer (03))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len - 08))) * 2 + Character'Pos (A_Name_Buffer (05))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len - 06))) * 2 + Character'Pos (A_Name_Buffer (07))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len - 04))) * 2 + Character'Pos (A_Name_Buffer (09))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len - 02))) * 2 + Character'Pos (A_Name_Buffer (11))) * 2 + Character'Pos (A_Name_Buffer (Even_Name_Len))) mod Hash_Num; end if; -- For the cases of 1-12 characters, all characters participate in the -- hash. The positioning is randomized, with the bias that characters -- later on participate fully (i.e. are added towards the right side). case (Int_1_12 (A_Name_Len)) is when 1 => return Character'Pos (A_Name_Buffer (1)); when 2 => return (( Character'Pos (A_Name_Buffer (1))) * 64 + Character'Pos (A_Name_Buffer (2))) mod Hash_Num; when 3 => return ((( Character'Pos (A_Name_Buffer (1))) * 16 + Character'Pos (A_Name_Buffer (3))) * 16 + Character'Pos (A_Name_Buffer (2))) mod Hash_Num; when 4 => return (((( Character'Pos (A_Name_Buffer (1))) * 8 + Character'Pos (A_Name_Buffer (2))) * 8 + Character'Pos (A_Name_Buffer (3))) * 8 + Character'Pos (A_Name_Buffer (4))) mod Hash_Num; when 5 => return ((((( Character'Pos (A_Name_Buffer (4))) * 8 + Character'Pos (A_Name_Buffer (1))) * 4 + Character'Pos (A_Name_Buffer (3))) * 4 + Character'Pos (A_Name_Buffer (5))) * 8 + Character'Pos (A_Name_Buffer (2))) mod Hash_Num; when 6 => return (((((( Character'Pos (A_Name_Buffer (5))) * 4 + Character'Pos (A_Name_Buffer (1))) * 4 + Character'Pos (A_Name_Buffer (4))) * 4 + Character'Pos (A_Name_Buffer (2))) * 4 + Character'Pos (A_Name_Buffer (6))) * 4 + Character'Pos (A_Name_Buffer (3))) mod Hash_Num; when 7 => return ((((((( Character'Pos (A_Name_Buffer (4))) * 4 + Character'Pos (A_Name_Buffer (3))) * 4 + Character'Pos (A_Name_Buffer (1))) * 4 + Character'Pos (A_Name_Buffer (2))) * 2 + Character'Pos (A_Name_Buffer (5))) * 2 + Character'Pos (A_Name_Buffer (7))) * 2 + Character'Pos (A_Name_Buffer (6))) mod Hash_Num; when 8 => return (((((((( Character'Pos (A_Name_Buffer (2))) * 4 + Character'Pos (A_Name_Buffer (1))) * 4 + Character'Pos (A_Name_Buffer (3))) * 2 + Character'Pos (A_Name_Buffer (5))) * 2 + Character'Pos (A_Name_Buffer (7))) * 2 + Character'Pos (A_Name_Buffer (6))) * 2 + Character'Pos (A_Name_Buffer (4))) * 2 + Character'Pos (A_Name_Buffer (8))) mod Hash_Num; when 9 => return ((((((((( Character'Pos (A_Name_Buffer (2))) * 4 + Character'Pos (A_Name_Buffer (1))) * 4 + Character'Pos (A_Name_Buffer (3))) * 4 + Character'Pos (A_Name_Buffer (4))) * 2 + Character'Pos (A_Name_Buffer (8))) * 2 + Character'Pos (A_Name_Buffer (7))) * 2 + Character'Pos (A_Name_Buffer (5))) * 2 + Character'Pos (A_Name_Buffer (6))) * 2 + Character'Pos (A_Name_Buffer (9))) mod Hash_Num; when 10 => return (((((((((( Character'Pos (A_Name_Buffer (01))) * 2 + Character'Pos (A_Name_Buffer (02))) * 2 + Character'Pos (A_Name_Buffer (08))) * 2 + Character'Pos (A_Name_Buffer (03))) * 2 + Character'Pos (A_Name_Buffer (04))) * 2 + Character'Pos (A_Name_Buffer (09))) * 2 + Character'Pos (A_Name_Buffer (06))) * 2 + Character'Pos (A_Name_Buffer (05))) * 2 + Character'Pos (A_Name_Buffer (07))) * 2 + Character'Pos (A_Name_Buffer (10))) mod Hash_Num; when 11 => return ((((((((((( Character'Pos (A_Name_Buffer (05))) * 2 + Character'Pos (A_Name_Buffer (01))) * 2 + Character'Pos (A_Name_Buffer (06))) * 2 + Character'Pos (A_Name_Buffer (09))) * 2 + Character'Pos (A_Name_Buffer (07))) * 2 + Character'Pos (A_Name_Buffer (03))) * 2 + Character'Pos (A_Name_Buffer (08))) * 2 + Character'Pos (A_Name_Buffer (02))) * 2 + Character'Pos (A_Name_Buffer (10))) * 2 + Character'Pos (A_Name_Buffer (04))) * 2 + Character'Pos (A_Name_Buffer (11))) mod Hash_Num; when 12 => return (((((((((((( Character'Pos (A_Name_Buffer (03))) * 2 + Character'Pos (A_Name_Buffer (02))) * 2 + Character'Pos (A_Name_Buffer (05))) * 2 + Character'Pos (A_Name_Buffer (01))) * 2 + Character'Pos (A_Name_Buffer (06))) * 2 + Character'Pos (A_Name_Buffer (04))) * 2 + Character'Pos (A_Name_Buffer (08))) * 2 + Character'Pos (A_Name_Buffer (11))) * 2 + Character'Pos (A_Name_Buffer (07))) * 2 + Character'Pos (A_Name_Buffer (09))) * 2 + Character'Pos (A_Name_Buffer (10))) * 2 + Character'Pos (A_Name_Buffer (12))) mod Hash_Num; when others => -- ??? !!! ??? -- this alternative can never been reached, but it looks like -- there is something wrong here with the compiler, it does not -- want to compile the code without this line (up to 3.10b) return 0; end case; end Hash; --------------- -- I_Options -- --------------- function I_Options (C : Context_Id) return Argument_List is Nul_Argument_List : constant Argument_List (1 .. 0) := (others => null); begin if Contexts.Table (C).Context_I_Options = null then return Nul_Argument_List; else return Contexts.Table (C).Context_I_Options.all; end if; end I_Options; ---------------- -- Initialize -- ---------------- procedure Initialize is begin Contexts.Init; Current_Context := Non_Associated; Current_Tree := Nil_Tree; end Initialize; -------------------- -- Pre_Initialize -- -------------------- procedure Pre_Initialize (C : Context_Id) is begin Backup_Current_Context; -- Clearing the Context Hash Table: for J in Hash_Index_Type loop Contexts.Table (C).Hash_Table (J) := No_Unit_Id; end loop; -- Initializing Context's internal tables: A_Name_Chars.Init; Unit_Table.Init; Tree_Table.Init; A4G.A_Elists.Initialize; Current_Context := C; Current_Tree := Nil_Tree; end Pre_Initialize; ---------------- -- Initialize -- ---------------- procedure Initialize (C : Context_Id) is begin Contexts.Table (C).Opened_At := A_OS_Time; Contexts.Table (C).Specs := 0; Contexts.Table (C).Bodies := 0; -- Clearing the Context Hash Table: for J in Hash_Index_Type loop Contexts.Table (C).Hash_Table (J) := No_Unit_Id; end loop; Set_Predefined_Units; end Initialize; --------------------------- -- Locate_In_Search_Path -- --------------------------- function Locate_In_Search_Path (C : Context_Id; File_Name : String; Dir_Kind : Search_Dir_Kinds) return String_Access is Curr_Dir : String_Access; Search_Path : Directory_List_Ptr; begin case Dir_Kind is when Source => Search_Path := Contexts.Table (C).Source_Path; when Object => Search_Path := Contexts.Table (C).Object_Path; when Tree => Search_Path := Contexts.Table (C).Tree_Path; end case; if Search_Path = null then -- this means that the current directory only should be used -- for locating the file if Is_Regular_File (File_Name) then return new String'(File_Name & ASCII.NUL); else return null; end if; end if; -- and here we have to look through the directory search path for I in 1 .. Search_Path'Last loop Curr_Dir := Search_Path (I); if Is_Regular_File (Curr_Dir.all & Directory_Separator & File_Name) then return new String' (Curr_Dir.all & Directory_Separator & File_Name & ASCII.NUL); end if; end loop; return null; end Locate_In_Search_Path; ------------- -- NB_Save -- ------------- procedure NB_Save is begin Backup_Name_Len := A_Name_Len; Backup_Name_Buffer (1 .. Backup_Name_Len) := A_Name_Buffer (1 .. A_Name_Len); end NB_Save; ---------------- -- NB_Restore -- ---------------- procedure NB_Restore is begin A_Name_Len := Backup_Name_Len; A_Name_Buffer (1 .. A_Name_Len) := Backup_Name_Buffer (1 .. Backup_Name_Len); end NB_Restore; ------------------------ -- Print_Context_Info -- ------------------------ procedure Print_Context_Info is begin Write_Str ("ASIS Context Table - general information:"); Write_Eol; Write_Eol; Write_Str ("The number of contexts which have been allocated: "); Write_Int (Int (Contexts.Last - First_Context_Id + 1)); Write_Eol; Write_Eol; Write_Str ("Default search paths:"); Write_Eol; Write_Eol; Write_Str ("Source search path:"); Write_Eol; Print_Source_Defaults; Write_Eol; Write_Str ("Object/ALI search path:"); Write_Eol; Print_Lib_Defaults; Write_Eol; Write_Str ("Tree search path:"); Write_Eol; Print_Tree_Defaults; Write_Eol; Write_Str ("====================================================="); Write_Eol; for C in First_Context_Id .. Contexts.Last loop Print_Context_Info (C); Write_Eol; end loop; end Print_Context_Info; ------------------------ -- Print_Context_Info -- ------------------------ procedure Print_Context_Info (C : Context_Id) is begin Reset_Context (C); Write_Str ("Debug output for context number: "); Write_Int (Int (C)); Write_Eol; if C = Non_Associated then Write_Str (" Nil Context, it can never be associated"); Write_Eol; return; end if; if Is_Associated (C) then Print_Context_Parameters (C); if Is_Opened (C) then Print_Units (C); Print_Trees (C); else Write_Str ("This Context is closed"); Write_Eol; end if; else Write_Str ("This Context is dissociated"); Write_Eol; end if; end Print_Context_Info; ------------------------------ -- Print_Context_Parameters -- ------------------------------ procedure Print_Context_Parameters (C : Context_Id) is begin Write_Str ("Association parameters for Context number: "); Write_Int (Int (C)); Write_Eol; if C = Non_Associated then Write_Str (" Nil Context, it can never be associated"); Write_Eol; return; end if; if Is_Associated (C) then Write_Str ("Context name: "); if Contexts.Table (C).Name = null or else Contexts.Table (C).Name.all = "" then Write_Str ("no name has been associated"); else Write_Str (Contexts.Table (C).Name.all); end if; Write_Eol; Write_Str ("Context parameters:"); Write_Eol; if Contexts.Table (C).Parameters = null then Write_Str (" no parameter has been associated"); else Write_Str (" " & Contexts.Table (C).Parameters.all); end if; Write_Eol; Write_Str ("Context Search Dirs:"); Write_Eol; Write_Str ("--------------------"); Write_Eol; Write_Str ("Source Dirs"); Write_Eol; Print_Context_Search_Dirs (C, Source); Write_Eol; Write_Str ("The source search path for calling GNAT is "); Write_Eol; if Contexts.Table (C).Context_I_Options = null then Write_Str (" no ""-I"" option has been associated"); Write_Eol; else for I in 1 .. Contexts.Table (C).Context_I_Options'Last loop Write_Str (" " & Contexts.Table (C).Context_I_Options (I).all); Write_Eol; end loop; end if; Write_Eol; Write_Str ("Object/ALI Dirs"); Write_Eol; Print_Context_Search_Dirs (C, Object); Write_Eol; Write_Eol; Write_Str ("Tree Dirs"); Write_Eol; Print_Context_Search_Dirs (C, Tree); Write_Eol; Write_Eol; else Write_Str ("The Context is dissociated"); Write_Eol; end if; end Print_Context_Parameters; ------------------------------- -- Print_Context_Search_Dirs -- ------------------------------- procedure Print_Context_Search_Dirs (C : Context_Id; Dir_Kind : Search_Dir_Kinds) is Path : Directory_List_Ptr; -- search path to print begin case Dir_Kind is when Source => Path := Contexts.Table (C).Source_Path; when Object => Path := Contexts.Table (C).Object_Path; when Tree => Path := Contexts.Table (C).Tree_Path; end case; if Path = null then Write_Str (" No directory has been associated"); return; end if; for I in Path'Range loop Write_Str (" " & Path (I).all); Write_Eol; end loop; Write_Eol; end Print_Context_Search_Dirs; -------------------------------- -- Process_Context_Parameters -- -------------------------------- procedure Process_Context_Parameters (Parameters : String; Cont : Context_Id := Non_Associated) is Cont_Parameters : Argument_List_Access; C_Set : Boolean := False; F_Set : Boolean := False; S_Set : Boolean := False; GCC_Set : Boolean := False; Next_TF_Name : Natural := 0; procedure Process_One_Parameter (Param : String); -- incapsulates processing of a separate parameter procedure Check_Parameters; -- Checks, that context options are compatible with each other and with -- the presence of tree files (if any). The check made by this procedure -- is not very smart - it detects only one error, and it does not try to -- provide a very detailed diagnostic procedure Process_Tree_File_Name (TF_Name : String); -- Checks, that TF_Name has tree file name suffix (.ats or .atb), and -- generates an ASIS warning if this check fails. Stores TF_Name in -- Context_Tree_Files list for the Context Cont. procedure Process_Source_File_For_GNSA (SF_Name : String); -- Checks if SF_Name is the name of the regular file, and if it is, -- stores it in the temporary variable procedure Process_gnatec_Option (Option : String); -- Checks if the string after '-gnatec' is the name of some file. If -- it is, frees Config_File and stores the -gnatec option into this -- variable. Otherwise raises ASIS_Failed with Status setting as -- Parameter_Error. ---------------------- -- Check_Parameters -- ---------------------- procedure Check_Parameters is Mode_Str : String := "-C?"; begin -- first, set defaults if needed: if not C_Set then Set_Default_Context_Processing_Mode (Cont); C_Set := True; end if; if not F_Set then Set_Default_Tree_Processing_Mode (Cont); F_Set := True; end if; if not S_Set then Set_Default_Source_Processing_Mode (Cont); S_Set := True; end if; -- Special processing for GNSA mode: if Tree_Processing_Mode (Cont) = GNSA and then Context_Processing_Mode (Cont) /= One_Tree then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "only -C1 mode can be set for -GNSA mode"); raise ASIS_Failed; end if; case Context_Processing_Mode (Cont) is when One_Tree | N_Trees => if Context_Processing_Mode (Cont) = One_Tree then Mode_Str (3) := '1'; else Mode_Str (3) := 'N'; end if; if not (Tree_Processing_Mode (Cont) = Pre_Created or else (Tree_Processing_Mode (Cont) = GNSA and then Context_Processing_Mode (Cont) = One_Tree)) then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "only -FT mode can be set for " & Mode_Str & " mode"); raise ASIS_Failed; end if; -- Process_Association_Option already checks, that at most one -- tree file can be set for this mode, and here we have to -- check, that at least one tree file is set GNSA is a special -- case at the moment): if Last_Tree_File < First_Tree_File and then Tree_Processing_Mode (Cont) /= GNSA then -- this means, that first tree file just has not been -- processed Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "no tree file is set for " & Mode_Str & " mode"); raise ASIS_Failed; end if; when Partition => -- for now, this is not implemented :-( Not_Implemented_Yet (Diagnosis => "Asis.Ada_Environments.Associate (-CP option)"); when All_Trees => -- all tree processing modes are allowed for All_Trees -- contexts, but no tree files should be explicitly set: if Last_Tree_File >= First_Tree_File then -- this means, that at least one tree file has been -- processed Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "no tree file must be set for -CA mode"); raise ASIS_Failed; end if; end case; if (Tree_Processing_Mode (Cont) = Mixed or else Tree_Processing_Mode (Cont) = On_The_Fly or else Tree_Processing_Mode (Cont) = Incremental or else Tree_Processing_Mode (Cont) = GNSA) and then Source_Processing_Mode (Cont) /= All_Sources then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "only -SA option is allowed if trees can be " & "created on the fly"); raise ASIS_Failed; end if; -- If we can create trees on the fly and the GCC field for the given -- context is not set, try to define from the ASIS tool name -- if we have to use some specific gcc if (Tree_Processing_Mode (Cont) = Mixed or else Tree_Processing_Mode (Cont) = On_The_Fly or else Tree_Processing_Mode (Cont) = Incremental) and then Contexts.Table (Cont).GCC = null then declare Tool_Name : constant String := GNAT.Directory_Operations.Base_Name (Normalize_Pathname (Ada.Command_Line.Command_Name)); Dash_Idx : Natural := 0; begin for J in reverse Tool_Name'Range loop if Tool_Name (J) = '-' then Dash_Idx := J; exit; end if; end loop; if Dash_Idx > 0 then Contexts.Table (Cont).GCC := Locate_Exec_On_Path (Tool_Name (Tool_Name'First .. Dash_Idx) & "gcc"); end if; end; end if; end Check_Parameters; --------------------------- -- Process_gnatec_Option -- --------------------------- procedure Process_gnatec_Option (Option : String) is File_Name_Start : Natural := Option'First + 7; begin if Option (File_Name_Start) = '=' then File_Name_Start := File_Name_Start + 1; end if; if File_Name_Start <= Option'Last and then Is_Regular_File (Option (File_Name_Start .. Option'Last)) then Free (Config_File); Config_File := new String'(Option); else Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "cannot find configuration pragmas file " & Option (File_Name_Start .. Option'Last)); raise ASIS_Failed; end if; end Process_gnatec_Option; --------------------------- -- Process_One_Parameter -- --------------------------- procedure Process_One_Parameter (Param : String) is Parameter : constant String (1 .. Param'Length) := Param; Par_Len : constant Positive := Parameter'Length; procedure Process_Parameter; procedure Process_Option; -- Process_Option works if Param starts from '-', and -- Process_Parameter works otherwise procedure Process_Parameter is begin -- the only parameter currently available for Context association -- is a tree file (or source file in case of GNSA context) name -- Special processing for GNSA mode: if Tree_Processing_Mode (Cont) = GNSA then Process_Source_File_For_GNSA (Parameter); return; end if; if Last_Tree_File < First_Tree_File then -- This means, that we've just encountered the first candidate -- for a tree file name as a part of the Parameters string. -- Therefore, we should set the default Context, tree and -- source processing options (if needed) and the corresponding -- flags: if not C_Set then Set_Default_Context_Processing_Mode (Cont); C_Set := True; end if; if not F_Set then Set_Default_Tree_Processing_Mode (Cont); F_Set := True; end if; if not S_Set then Set_Default_Source_Processing_Mode (Cont); S_Set := True; end if; else -- more than one tree file is illegal in -C1 mode if Context_Processing_Mode (Cont) = One_Tree then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "only one tree file is allowed in " & "-C1 mode"); raise ASIS_Failed; end if; end if; Process_Tree_File_Name (Parameter); end Process_Parameter; procedure Process_Option is Switch_Char : Character; begin if Par_Len < 3 then goto Wrong_Par; else Switch_Char := Parameter (2); end if; if Switch_Char = 'C' and then Par_Len = 3 then if C_Set then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "-C option is either misplaced " & "or duplicated"); raise ASIS_Failed; else Switch_Char := Parameter (3); case Switch_Char is when '1' => Set_Context_Processing_Mode (Cont, One_Tree); when 'N' => Set_Context_Processing_Mode (Cont, N_Trees); when 'P' => Set_Context_Processing_Mode (Cont, Partition); when 'A' => Set_Context_Processing_Mode (Cont, All_Trees); when others => goto Wrong_Par; end case; C_Set := True; end if; elsif Switch_Char = 'F' and then Par_Len = 3 then if F_Set then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "-F option is either misplaced " & "or duplicated"); raise ASIS_Failed; else Switch_Char := Parameter (3); case Switch_Char is when 'S' => Set_Tree_Processing_Mode (Cont, On_The_Fly); when 'T' => Set_Tree_Processing_Mode (Cont, Pre_Created); when 'M' => Set_Tree_Processing_Mode (Cont, Mixed); when 'I' => Set_Tree_Processing_Mode (Cont, Incremental); when others => goto Wrong_Par; end case; F_Set := True; end if; elsif Switch_Char = 'S' and then Par_Len = 3 then if S_Set then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "-S option is either misplaced" & " or duplicated"); raise ASIS_Failed; else Switch_Char := Parameter (3); case Switch_Char is when 'A' => Set_Source_Processing_Mode (Cont, All_Sources); when 'E' => Set_Source_Processing_Mode (Cont, Existing_Sources); when 'N' => Set_Source_Processing_Mode (Cont, No_Sources); when others => goto Wrong_Par; end case; S_Set := True; end if; elsif Switch_Char = 'I' then Process_Dir (Parameter (3 .. Par_Len), Source); elsif Switch_Char = 'O' then Process_Dir (Parameter (3 .. Par_Len), Object); elsif Switch_Char = 'T' then Process_Dir (Parameter (3 .. Par_Len), Tree); elsif Switch_Char = 'g' and then Par_Len >= 8 and then Parameter (1 .. 7) = "-gnatec" then Process_gnatec_Option (Parameter); elsif Parameter = "-AOP" then Set_Use_Default_Trees (Cont, True); elsif Switch_Char = '-' and then Parameter (1 .. 6) = "--GCC=" then if GCC_Set then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "--GCC option is duplicated"); raise ASIS_Failed; else GCC_Set := True; Contexts.Table (Cont).GCC := Locate_Exec_On_Path (Parameter (7 .. Parameter'Last)); end if; elsif Parameter = "-gnatA" then GnatA_Set := True; elsif Parameter = "-GNSA" then -- Special processing for GNSA Set_Tree_Processing_Mode (Cont, GNSA); Set_Source_Processing_Mode (Cont, All_Sources); Set_Context_Processing_Mode (Cont, One_Tree); F_Set := True; C_Set := True; S_Set := True; else goto Wrong_Par; end if; return; <<Wrong_Par>> ASIS_Warning (Message => "Asis.Ada_Environments.Associate: " & "unknown option " & Parameter, Error => Parameter_Error); end Process_Option; begin -- Process_One_Parameter if Parameter (1) = '-' then Process_Option; else Process_Parameter; end if; end Process_One_Parameter; ---------------------------------- -- Process_Source_File_For_GNSA -- ---------------------------------- procedure Process_Source_File_For_GNSA (SF_Name : String) is begin if not Is_Regular_File (SF_Name) then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate: " & "file " & SF_Name & "does not exist"); raise ASIS_Failed; end if; Free (GNSA_Source); GNSA_Source := new String'(SF_Name); end Process_Source_File_For_GNSA; ---------------------------- -- Process_Tree_File_Name -- ---------------------------- procedure Process_Tree_File_Name (TF_Name : String) is TF_First : Positive := TF_Name'First; TF_Last : Positive := TF_Name'Last; TF_Len : Positive; Wrong_Name : Boolean; T_File_Name : Name_Id; begin if TF_Name (TF_First) = '"' and then TF_Name (TF_Last) = '"' then TF_First := TF_First + 1; TF_Last := TF_Last - 1; end if; TF_Len := TF_Last - TF_First + 1; Wrong_Name := not ( TF_Len >= 5 and then (TF_Name (TF_Last) = 't' or else TF_Name (TF_Last) = 'T') and then (TF_Name (TF_Last - 1) = 'd' or else TF_Name (TF_Last - 1) = 'D') and then (TF_Name (TF_Last - 2) = 'a' or else TF_Name (TF_Last - 2) = 'A') and then TF_Name (TF_Last - 3) = '.'); if Wrong_Name then ASIS_Warning (Message => "Asis.Ada_Environments.Associate: " & TF_Name & " does not have a form of a tree file name", Error => Parameter_Error); end if; for I in TF_First .. TF_Last loop Name_Buffer (I) := TF_Name (I); end loop; Name_Len := TF_Len; T_File_Name := Name_Find; if T_File_Name > Last_Tree_File then Last_Tree_File := T_File_Name; Next_TF_Name := Next_TF_Name + 1; Contexts.Table (Cont).Context_Tree_Files (Next_TF_Name) := new String'(TF_Name (TF_First .. TF_Last)); end if; end Process_Tree_File_Name; begin -- Process_Context_Parameters Free (Config_File); GnatA_Set := False; if Tree_Processing_Mode (Cont) /= GNSA then -- In GNSA mode we should not destroy the GNAT name table. -- ??? But why? We run GNSA after that? -- Should be revised for non -C1 GNSA modes, if any Namet.Initialize; -- ??? First_Tree_File := First_Name_Id; Last_Tree_File := First_Name_Id - 1; end if; Set_Use_Default_Trees (Cont, False); if Parameters /= "" then Cont_Parameters := Parameter_String_To_List (Parameters); Contexts.Table (Cont).Context_Tree_Files := new Argument_List (1 .. Cont_Parameters'Length); for I in Cont_Parameters'Range loop Process_One_Parameter (Cont_Parameters (I).all); end loop; Free_Argument_List (Cont_Parameters); end if; Check_Parameters; Set_Context_Parameters (Cont, Parameters); Set_Search_Paths (Cont); end Process_Context_Parameters; ----------------- -- Process_Dir -- ----------------- procedure Process_Dir (Dir_Name : String; Dir_Kind : Search_Dir_Kinds) is First : Positive := Dir_Name'First; Last : Natural := Dir_Name'Last; New_Dir : Link; begin if Dir_Name (First) = '"' and then Dir_Name (Last) = '"' then First := First + 1; Last := Last - 1; end if; if not Is_Directory (Dir_Name (First .. Last)) then Set_Error_Status (Status => Asis.Errors.Parameter_Error, Diagnosis => "Asis.Ada_Environments.Associate:" & ASIS_Line_Terminator & "Wrong parameter for Context " & "Association: " & Dir_Name & " is not a directory name"); raise ASIS_Failed; end if; New_Dir := new Dir_Rec; New_Dir.Dir_Name := new String'(Dir_Name (First .. Last)); case Dir_Kind is when Source => Source_Dirs_Count := Source_Dirs_Count + 1; Append_Dir (Source_Dirs, New_Dir); when Object => Object_Dirs_Count := Object_Dirs_Count + 1; Append_Dir (Object_Dirs, New_Dir); when Tree => Tree_Dirs_Count := Tree_Dirs_Count + 1; Append_Dir (Tree_Dirs, New_Dir); end case; end Process_Dir; -------------------- -- Scan_Trees_New -- -------------------- procedure Scan_Trees_New (C : Context_Id) is begin Scan_Tree_Files_New (C); Investigate_Trees_New (C); -- And now, when all the unit attributes are set, we compute integrated -- dependencies Set_All_Dependencies; Reorder_Trees (C); end Scan_Trees_New; ---------------------- -- Set_Context_Name -- ---------------------- procedure Set_Context_Name (C : Context_Id; Name : String) is begin Contexts.Table (C).Name := new String'(Name); end Set_Context_Name; ---------------------------- -- Set_Context_Parameters -- ---------------------------- procedure Set_Context_Parameters (C : Context_Id; Parameters : String) is begin Contexts.Table (C).Parameters := new String'(Parameters); end Set_Context_Parameters; ----------------------- -- Set_Empty_Context -- ----------------------- procedure Set_Empty_Context (C : Context_Id) is Cont : constant Context_Id := C; begin -- We explicitly set all the fields of the context record Contexts.Table (C).Name := null; Contexts.Table (C).Parameters := null; Contexts.Table (C).GCC := null; Set_Is_Associated (Cont, False); Set_Is_Opened (Cont, False); Set_Use_Default_Trees (Cont, False); Contexts.Table (C).Opened_At := Last_ASIS_OS_Time; Contexts.Table (C).Specs := 0; Contexts.Table (C).Bodies := 0; for J in Hash_Index_Type loop Contexts.Table (C).Hash_Table (J) := Nil_Unit; end loop; Contexts.Table (C).Current_Main_Unit := Nil_Unit; Contexts.Table (C).Source_Path := null; Contexts.Table (C).Object_Path := null; Contexts.Table (C).Tree_Path := null; Contexts.Table (C).Context_I_Options := null; Contexts.Table (C).Context_Tree_Files := null; Contexts.Table (C).Mode := All_Trees; Contexts.Table (C).Tree_Processing := Pre_Created; Contexts.Table (C).Source_Processing := All_Sources; end Set_Empty_Context; --------------------- -- Set_Current_Cont -- --------------------- procedure Set_Current_Cont (L : Context_Id) is begin Current_Context := L; end Set_Current_Cont; ---------------------- -- Set_Current_Tree -- ---------------------- procedure Set_Current_Tree (Tree : Tree_Id) is begin Current_Tree := Tree; end Set_Current_Tree; ---------------------- -- Set_Name_String -- ---------------------- procedure Set_Name_String (S : String) is begin A_Name_Len := S'Length; A_Name_Buffer (1 .. A_Name_Len) := S; end Set_Name_String; -------------------------- -- Set_Predefined_Units -- -------------------------- procedure Set_Predefined_Units is Cont : constant Context_Id := Get_Current_Cont; C_U : Unit_Id; begin -- set the entry for the package Standard: -- The problem here is that Ada allows to redefine Standard, so we use -- a special normalized name for predefined Standard, and a "normal" -- normalized name for redefinition of Standard. See also -- A4G.Get_Unit.Fetch_Unit_By_Ada_Name Set_Name_String ("__standard%s"); C_U := Allocate_Unit_Entry (Cont); -- C_U should be equal to Standard_Id. Should we check this here? Set_Name_String ("Standard"); Set_Ada_Name (C_U); Set_Kind (Cont, C_U, A_Package); Set_Class (Cont, C_U, A_Public_Declaration); Set_Top (Cont, C_U, Empty); -- What is the best solution for computing the top node of the -- subtree for the package Standard? Now we compute it in -- Asis.Set_Get.Top... Set_Time_Stamp (Cont, C_U, Empty_Time_Stamp); Set_Origin (Cont, C_U, A_Predefined_Unit); Set_Is_Main_Unit (Cont, C_U, False); Set_Is_Body_Required (Cont, C_U, False); Set_Source_Status (Cont, C_U, Absent); -- as for the source file, it was set to Nil when allocating the -- unit entry -- Set the entry for A_Configuration_Compilation Set_Name_String ("__configuration_compilation%s"); C_U := Allocate_Unit_Entry (Cont); -- C_U should be equal to Config_Comp_Id. Should we check this here? -- Allocate_Unit_Entry counts A_Configuration_Compilation as a spec -- unit, but actually it is not a spec, so we have to decrease the -- counter back: Contexts.Table (Cont).Specs := Contexts.Table (Cont).Specs - 1; Set_Name_String ("__Configuration_Compilation"); -- This name will never be displayed by ASIS Set_Ada_Name (C_U); Set_Kind (Cont, C_U, A_Configuration_Compilation); Set_Class (Cont, C_U, A_Public_Declaration); Set_Top (Cont, C_U, Empty); Set_Time_Stamp (Cont, C_U, Empty_Time_Stamp); Set_Origin (Cont, C_U, A_Predefined_Unit); -- A_Predefined_Unit? It does not matter, actually... Set_Is_Main_Unit (Cont, C_U, False); Set_Is_Body_Required (Cont, C_U, False); Set_Source_Status (Cont, C_U, Absent); -- as for the source file, it was set to Nil when allocating the -- unit entry end Set_Predefined_Units; ---------------------- -- Set_Search_Paths -- ---------------------- procedure Set_Search_Paths (C : Context_Id) is I_Opt_Len : constant Natural := Source_Dirs_Count; N_Config_File_Options : Natural := 0; Idx : Natural; procedure Set_Path (Path : in out Directory_List_Ptr; From : in out Dir_List; N : in out Natural); -- Sets the given search path, N is the count of the directories. -- resets the temporary data structures used to keep and to count -- directory names procedure Set_Path (Path : in out Directory_List_Ptr; From : in out Dir_List; N : in out Natural) is Next_Dir : Link := From.First; begin if N = 0 then From.First := null; -- just in case From.Last := null; -- just in case return; -- we have nothing to do, and the corresponding search path -- will remain null, as it should have been before the call end if; Path := new Argument_List (1 .. N); for I in 1 .. N loop Path (I) := new String'(Next_Dir.Dir_Name.all); Free (Next_Dir.Dir_Name); Next_Dir := Next_Dir.Next; end loop; From.First := null; From.Last := null; N := 0; -- we free the memory occupied by strings stored in this temporary -- list of directories, but we do not free the memory used by the -- links. We hope we can skip this optimization end Set_Path; begin -- Set_Search_Paths Set_Path (Contexts.Table (C).Source_Path, Source_Dirs, Source_Dirs_Count); Set_Path (Contexts.Table (C).Object_Path, Object_Dirs, Object_Dirs_Count); Set_Path (Contexts.Table (C).Tree_Path, Tree_Dirs, Tree_Dirs_Count); -- And the last thing to do is to set for a given Context its -- Context_I_Options field: if I_Opt_Len = 0 and then Config_File = null and then not GnatA_Set and then Tree_Processing_Mode (C) /= GNSA then Contexts.Table (C).Context_I_Options := null; -- just in case return; end if; if Config_File /= null then N_Config_File_Options := N_Config_File_Options + 1; end if; if GnatA_Set then N_Config_File_Options := N_Config_File_Options + 1; end if; Contexts.Table (C).Context_I_Options := new Argument_List (1 .. I_Opt_Len + N_Config_File_Options + 1); for I in 1 .. I_Opt_Len loop Contexts.Table (C).Context_I_Options (I) := new String'("-I" & Contexts.Table (C).Source_Path (I).all); end loop; Idx := I_Opt_Len; if Config_File /= null then Idx := Idx + 1; Contexts.Table (C).Context_I_Options (Idx) := new String'(Config_File.all); end if; if GnatA_Set then Idx := Idx + 1; Contexts.Table (C).Context_I_Options (Idx) := new String'("-gnatA"); end if; Idx := Idx + 1; if Tree_Processing_Mode (C) = GNSA then Contexts.Table (C).Context_I_Options (Idx) := new String'(GNSA_Source.all); else -- For non-GNSA on the fly compilation we always set -I- Contexts.Table (C).Context_I_Options (Idx) := new String'("-I-"); end if; end Set_Search_Paths; --------------------------------------------------- -- Context Attributes Access and Update Routines -- --------------------------------------------------- function Is_Associated (C : Context_Id) return Boolean is begin return C /= Non_Associated and then Contexts.Table (C).Is_Associated; end Is_Associated; function Is_Opened (C : Context_Id) return Boolean is begin return C /= Non_Associated and then Contexts.Table (C).Is_Opened; end Is_Opened; function Opened_At (C : Context_Id) return ASIS_OS_Time is begin return Contexts.Table (C).Opened_At; end Opened_At; function Context_Processing_Mode (C : Context_Id) return Context_Mode is begin return Contexts.Table (C).Mode; end Context_Processing_Mode; function Tree_Processing_Mode (C : Context_Id) return Tree_Mode is begin return Contexts.Table (C).Tree_Processing; end Tree_Processing_Mode; function Source_Processing_Mode (C : Context_Id) return Source_Mode is begin return Contexts.Table (C).Source_Processing; end Source_Processing_Mode; function Use_Default_Trees (C : Context_Id) return Boolean is begin return Contexts.Table (C).Use_Default_Trees; end Use_Default_Trees; function Gcc_To_Call (C : Context_Id) return String_Access is begin return Contexts.Table (C).GCC; end Gcc_To_Call; -------- procedure Set_Is_Associated (C : Context_Id; Ass : Boolean) is begin Contexts.Table (C).Is_Associated := Ass; end Set_Is_Associated; procedure Set_Is_Opened (C : Context_Id; Op : Boolean) is begin Contexts.Table (C).Is_Opened := Op; end Set_Is_Opened; procedure Set_Context_Processing_Mode (C : Context_Id; M : Context_Mode) is begin Contexts.Table (C).Mode := M; end Set_Context_Processing_Mode; procedure Set_Tree_Processing_Mode (C : Context_Id; M : Tree_Mode) is begin Contexts.Table (C).Tree_Processing := M; end Set_Tree_Processing_Mode; procedure Set_Source_Processing_Mode (C : Context_Id; M : Source_Mode) is begin Contexts.Table (C).Source_Processing := M; end Set_Source_Processing_Mode; procedure Set_Use_Default_Trees (C : Context_Id; B : Boolean) is begin Contexts.Table (C).Use_Default_Trees := B; end Set_Use_Default_Trees; procedure Set_Default_Context_Processing_Mode (C : Context_Id) is begin Contexts.Table (C).Mode := All_Trees; end Set_Default_Context_Processing_Mode; procedure Set_Default_Tree_Processing_Mode (C : Context_Id) is begin Contexts.Table (C).Tree_Processing := Pre_Created; end Set_Default_Tree_Processing_Mode; procedure Set_Default_Source_Processing_Mode (C : Context_Id) is begin Contexts.Table (C).Source_Processing := All_Sources; end Set_Default_Source_Processing_Mode; ----------------- -- NEW STUFF -- ----------------- ---------------------------- -- Backup_Current_Context -- ---------------------------- procedure Backup_Current_Context is begin if Current_Context /= Nil_Context_Id then Save_Context (Current_Context); end if; end Backup_Current_Context; ------------------- -- Reset_Context -- ------------------- procedure Reset_Context (C : Context_Id) is begin if C = Nil_Context_Id then return; elsif C /= Current_Context then if Is_Opened (Current_Context) then Save_Context (Current_Context); end if; if Is_Opened (C) then Restore_Context (C); end if; Current_Context := C; -- we have to do also this: Current_Tree := Nil_Tree; -- otherwise node/tree access in a new Context may not reset the tree -- in case in tree Ids in the old and new Contexts are the same end if; end Reset_Context; --------------------- -- Restore_Context -- --------------------- procedure Restore_Context (C : Context_Id) is begin A_Name_Chars.Restore (Contexts.Table (C).Back_Up.Context_Name_Chars); Unit_Table.Restore (Contexts.Table (C).Back_Up.Units); Tree_Table.Restore (Contexts.Table (C).Back_Up.Trees); -- restoring lists tables: A4G.A_Elists.Elmts.Restore (Contexts.Table (C).Back_Up.Context_Unit_Lists.Saved_Elmts); A4G.A_Elists.Elists.Restore (Contexts.Table (C).Back_Up.Context_Unit_Lists.Saved_Elists); end Restore_Context; ------------------ -- Save_Context -- ------------------ procedure Save_Context (C : Context_Id) is begin if Is_Opened (C) then Contexts.Table (C).Back_Up.Context_Name_Chars := A_Name_Chars.Save; Contexts.Table (C).Back_Up.Units := Unit_Table.Save; Contexts.Table (C).Back_Up.Trees := Tree_Table.Save; -- saving lists tables: Contexts.Table (C).Back_Up.Context_Unit_Lists.Saved_Elmts := A4G.A_Elists.Elmts.Save; Contexts.Table (C).Back_Up.Context_Unit_Lists.Saved_Elists := A4G.A_Elists.Elists.Save; end if; end Save_Context; ------------------------- -- Verify_Context_Name -- ------------------------- procedure Verify_Context_Name (Name : String; Cont : Context_Id) is begin -- no verification is performed now - we simply have no idea, what -- and how to verify :-I Set_Context_Name (Cont, Name); end Verify_Context_Name; end A4G.Contt;
oeis/066/A066635.asm
neoneye/loda-programs
11
179405
<gh_stars>10-100 ; A066635: Distance from n to closest square different from n. ; Submitted by <NAME>(s2) ; 1,1,1,3,1,2,2,1,5,1,2,3,3,2,1,7,1,2,3,4,4,3,2,1,9,1,2,3,4,5,5,4,3,2,1,11,1,2,3,4,5,6,6,5,4,3,2,1,13,1,2,3,4,5,6,7,7,6,5,4,3,2,1,15,1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1,17,1,2,3,4,5,6,7,8,9,9,8,7,6,5,4,3,2,1,19 trn $0,1 lpb $0 add $2,2 mov $1,$2 trn $1,$0 trn $0,$2 add $0,$1 sub $0,1 lpe add $0,1
usr/init.asm
AnvithShetty10/xv6_rpi3_port
1
170894
<reponame>AnvithShetty10/xv6_rpi3_port _init: file format elf32-littlearm Disassembly of section .text: 00000000 <main>: 0: e92d4800 push {fp, lr} 4: e28db004 add fp, sp, #4 8: e24dd008 sub sp, sp, #8 c: e59f00cc ldr r0, [pc, #204] ; e0 <main+0xe0> 10: e3a01002 mov r1, #2 14: eb0001bd bl 710 <open> 18: e1a03000 mov r3, r0 1c: e3530000 cmp r3, #0 20: aa000006 bge 40 <main+0x40> 24: e59f00b4 ldr r0, [pc, #180] ; e0 <main+0xe0> 28: e3a01001 mov r1, #1 2c: e3a02001 mov r2, #1 30: eb0001bf bl 734 <mknod> 34: e59f00a4 ldr r0, [pc, #164] ; e0 <main+0xe0> 38: e3a01002 mov r1, #2 3c: eb0001b3 bl 710 <open> 40: e3a00000 mov r0, #0 44: eb0001f0 bl 80c <dup> 48: e3a00000 mov r0, #0 4c: eb0001ee bl 80c <dup> 50: e3a00001 mov r0, #1 54: e59f1088 ldr r1, [pc, #136] ; e4 <main+0xe4> 58: eb000271 bl a24 <printf> 5c: eb00015a bl 5cc <fork> 60: e50b0008 str r0, [fp, #-8] 64: e51b3008 ldr r3, [fp, #-8] 68: e3530000 cmp r3, #0 6c: aa000003 bge 80 <main+0x80> 70: e3a00001 mov r0, #1 74: e59f106c ldr r1, [pc, #108] ; e8 <main+0xe8> 78: eb000269 bl a24 <printf> 7c: eb00015b bl 5f0 <exit> 80: e51b3008 ldr r3, [fp, #-8] 84: e3530000 cmp r3, #0 88: 1a000006 bne a8 <main+0xa8> 8c: e59f0058 ldr r0, [pc, #88] ; ec <main+0xec> 90: e59f1058 ldr r1, [pc, #88] ; f0 <main+0xf0> 94: eb000194 bl 6ec <exec> 98: e3a00001 mov r0, #1 9c: e59f1050 ldr r1, [pc, #80] ; f4 <main+0xf4> a0: eb00025f bl a24 <printf> a4: eb000151 bl 5f0 <exit> a8: ea000002 b b8 <main+0xb8> ac: e3a00001 mov r0, #1 b0: e59f1040 ldr r1, [pc, #64] ; f8 <main+0xf8> b4: eb00025a bl a24 <printf> b8: eb000155 bl 614 <wait> bc: e50b000c str r0, [fp, #-12] c0: e51b300c ldr r3, [fp, #-12] c4: e3530000 cmp r3, #0 c8: ba000003 blt dc <main+0xdc> cc: e51b200c ldr r2, [fp, #-12] d0: e51b3008 ldr r3, [fp, #-8] d4: e1520003 cmp r2, r3 d8: 1afffff3 bne ac <main+0xac> dc: eaffffdb b 50 <main+0x50> e0: 000010d8 .word 0x000010d8 e4: 000010e0 .word 0x000010e0 e8: 000010f4 .word 0x000010f4 ec: 000010d4 .word 0x000010d4 f0: 00001134 .word 0x00001134 f4: 00001108 .word 0x00001108 f8: 00001120 .word 0x00001120 000000fc <strcpy>: fc: e52db004 push {fp} ; (str fp, [sp, #-4]!) 100: e28db000 add fp, sp, #0 104: e24dd014 sub sp, sp, #20 108: e50b0010 str r0, [fp, #-16] 10c: e50b1014 str r1, [fp, #-20] ; 0xffffffec 110: e51b3010 ldr r3, [fp, #-16] 114: e50b3008 str r3, [fp, #-8] 118: e1a00000 nop ; (mov r0, r0) 11c: e51b3010 ldr r3, [fp, #-16] 120: e2832001 add r2, r3, #1 124: e50b2010 str r2, [fp, #-16] 128: e51b2014 ldr r2, [fp, #-20] ; 0xffffffec 12c: e2821001 add r1, r2, #1 130: e50b1014 str r1, [fp, #-20] ; 0xffffffec 134: e5d22000 ldrb r2, [r2] 138: e5c32000 strb r2, [r3] 13c: e5d33000 ldrb r3, [r3] 140: e3530000 cmp r3, #0 144: 1afffff4 bne 11c <strcpy+0x20> 148: e51b3008 ldr r3, [fp, #-8] 14c: e1a00003 mov r0, r3 150: e24bd000 sub sp, fp, #0 154: e49db004 pop {fp} ; (ldr fp, [sp], #4) 158: e12fff1e bx lr 0000015c <strcmp>: 15c: e52db004 push {fp} ; (str fp, [sp, #-4]!) 160: e28db000 add fp, sp, #0 164: e24dd00c sub sp, sp, #12 168: e50b0008 str r0, [fp, #-8] 16c: e50b100c str r1, [fp, #-12] 170: ea000005 b 18c <strcmp+0x30> 174: e51b3008 ldr r3, [fp, #-8] 178: e2833001 add r3, r3, #1 17c: e50b3008 str r3, [fp, #-8] 180: e51b300c ldr r3, [fp, #-12] 184: e2833001 add r3, r3, #1 188: e50b300c str r3, [fp, #-12] 18c: e51b3008 ldr r3, [fp, #-8] 190: e5d33000 ldrb r3, [r3] 194: e3530000 cmp r3, #0 198: 0a000005 beq 1b4 <strcmp+0x58> 19c: e51b3008 ldr r3, [fp, #-8] 1a0: e5d32000 ldrb r2, [r3] 1a4: e51b300c ldr r3, [fp, #-12] 1a8: e5d33000 ldrb r3, [r3] 1ac: e1520003 cmp r2, r3 1b0: 0affffef beq 174 <strcmp+0x18> 1b4: e51b3008 ldr r3, [fp, #-8] 1b8: e5d33000 ldrb r3, [r3] 1bc: e1a02003 mov r2, r3 1c0: e51b300c ldr r3, [fp, #-12] 1c4: e5d33000 ldrb r3, [r3] 1c8: e0633002 rsb r3, r3, r2 1cc: e1a00003 mov r0, r3 1d0: e24bd000 sub sp, fp, #0 1d4: e49db004 pop {fp} ; (ldr fp, [sp], #4) 1d8: e12fff1e bx lr 000001dc <strlen>: 1dc: e52db004 push {fp} ; (str fp, [sp, #-4]!) 1e0: e28db000 add fp, sp, #0 1e4: e24dd014 sub sp, sp, #20 1e8: e50b0010 str r0, [fp, #-16] 1ec: e3a03000 mov r3, #0 1f0: e50b3008 str r3, [fp, #-8] 1f4: ea000002 b 204 <strlen+0x28> 1f8: e51b3008 ldr r3, [fp, #-8] 1fc: e2833001 add r3, r3, #1 200: e50b3008 str r3, [fp, #-8] 204: e51b3008 ldr r3, [fp, #-8] 208: e51b2010 ldr r2, [fp, #-16] 20c: e0823003 add r3, r2, r3 210: e5d33000 ldrb r3, [r3] 214: e3530000 cmp r3, #0 218: 1afffff6 bne 1f8 <strlen+0x1c> 21c: e51b3008 ldr r3, [fp, #-8] 220: e1a00003 mov r0, r3 224: e24bd000 sub sp, fp, #0 228: e49db004 pop {fp} ; (ldr fp, [sp], #4) 22c: e12fff1e bx lr 00000230 <memset>: 230: e52db004 push {fp} ; (str fp, [sp, #-4]!) 234: e28db000 add fp, sp, #0 238: e24dd024 sub sp, sp, #36 ; 0x24 23c: e50b0018 str r0, [fp, #-24] ; 0xffffffe8 240: e50b101c str r1, [fp, #-28] ; 0xffffffe4 244: e50b2020 str r2, [fp, #-32] ; 0xffffffe0 248: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 24c: e50b3008 str r3, [fp, #-8] 250: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 254: e54b300d strb r3, [fp, #-13] 258: e55b300d ldrb r3, [fp, #-13] 25c: e1a02c03 lsl r2, r3, #24 260: e55b300d ldrb r3, [fp, #-13] 264: e1a03803 lsl r3, r3, #16 268: e1822003 orr r2, r2, r3 26c: e55b300d ldrb r3, [fp, #-13] 270: e1a03403 lsl r3, r3, #8 274: e1822003 orr r2, r2, r3 278: e55b300d ldrb r3, [fp, #-13] 27c: e1823003 orr r3, r2, r3 280: e50b3014 str r3, [fp, #-20] ; 0xffffffec 284: ea000008 b 2ac <memset+0x7c> 288: e51b3008 ldr r3, [fp, #-8] 28c: e55b200d ldrb r2, [fp, #-13] 290: e5c32000 strb r2, [r3] 294: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 298: e2433001 sub r3, r3, #1 29c: e50b3020 str r3, [fp, #-32] ; 0xffffffe0 2a0: e51b3008 ldr r3, [fp, #-8] 2a4: e2833001 add r3, r3, #1 2a8: e50b3008 str r3, [fp, #-8] 2ac: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 2b0: e3530000 cmp r3, #0 2b4: 0a000003 beq 2c8 <memset+0x98> 2b8: e51b3008 ldr r3, [fp, #-8] 2bc: e2033003 and r3, r3, #3 2c0: e3530000 cmp r3, #0 2c4: 1affffef bne 288 <memset+0x58> 2c8: e51b3008 ldr r3, [fp, #-8] 2cc: e50b300c str r3, [fp, #-12] 2d0: ea000008 b 2f8 <memset+0xc8> 2d4: e51b300c ldr r3, [fp, #-12] 2d8: e51b2014 ldr r2, [fp, #-20] ; 0xffffffec 2dc: e5832000 str r2, [r3] 2e0: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 2e4: e2433004 sub r3, r3, #4 2e8: e50b3020 str r3, [fp, #-32] ; 0xffffffe0 2ec: e51b300c ldr r3, [fp, #-12] 2f0: e2833004 add r3, r3, #4 2f4: e50b300c str r3, [fp, #-12] 2f8: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 2fc: e3530003 cmp r3, #3 300: 8afffff3 bhi 2d4 <memset+0xa4> 304: e51b300c ldr r3, [fp, #-12] 308: e50b3008 str r3, [fp, #-8] 30c: ea000008 b 334 <memset+0x104> 310: e51b3008 ldr r3, [fp, #-8] 314: e55b200d ldrb r2, [fp, #-13] 318: e5c32000 strb r2, [r3] 31c: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 320: e2433001 sub r3, r3, #1 324: e50b3020 str r3, [fp, #-32] ; 0xffffffe0 328: e51b3008 ldr r3, [fp, #-8] 32c: e2833001 add r3, r3, #1 330: e50b3008 str r3, [fp, #-8] 334: e51b3020 ldr r3, [fp, #-32] ; 0xffffffe0 338: e3530000 cmp r3, #0 33c: 1afffff3 bne 310 <memset+0xe0> 340: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 344: e1a00003 mov r0, r3 348: e24bd000 sub sp, fp, #0 34c: e49db004 pop {fp} ; (ldr fp, [sp], #4) 350: e12fff1e bx lr 00000354 <strchr>: 354: e52db004 push {fp} ; (str fp, [sp, #-4]!) 358: e28db000 add fp, sp, #0 35c: e24dd00c sub sp, sp, #12 360: e50b0008 str r0, [fp, #-8] 364: e1a03001 mov r3, r1 368: e54b3009 strb r3, [fp, #-9] 36c: ea000009 b 398 <strchr+0x44> 370: e51b3008 ldr r3, [fp, #-8] 374: e5d33000 ldrb r3, [r3] 378: e55b2009 ldrb r2, [fp, #-9] 37c: e1520003 cmp r2, r3 380: 1a000001 bne 38c <strchr+0x38> 384: e51b3008 ldr r3, [fp, #-8] 388: ea000007 b 3ac <strchr+0x58> 38c: e51b3008 ldr r3, [fp, #-8] 390: e2833001 add r3, r3, #1 394: e50b3008 str r3, [fp, #-8] 398: e51b3008 ldr r3, [fp, #-8] 39c: e5d33000 ldrb r3, [r3] 3a0: e3530000 cmp r3, #0 3a4: 1afffff1 bne 370 <strchr+0x1c> 3a8: e3a03000 mov r3, #0 3ac: e1a00003 mov r0, r3 3b0: e24bd000 sub sp, fp, #0 3b4: e49db004 pop {fp} ; (ldr fp, [sp], #4) 3b8: e12fff1e bx lr 000003bc <gets>: 3bc: e92d4800 push {fp, lr} 3c0: e28db004 add fp, sp, #4 3c4: e24dd018 sub sp, sp, #24 3c8: e50b0018 str r0, [fp, #-24] ; 0xffffffe8 3cc: e50b101c str r1, [fp, #-28] ; 0xffffffe4 3d0: e3a03000 mov r3, #0 3d4: e50b3008 str r3, [fp, #-8] 3d8: ea000017 b 43c <gets+0x80> 3dc: e24b300d sub r3, fp, #13 3e0: e3a00000 mov r0, #0 3e4: e1a01003 mov r1, r3 3e8: e3a02001 mov r2, #1 3ec: eb00009a bl 65c <read> 3f0: e50b000c str r0, [fp, #-12] 3f4: e51b300c ldr r3, [fp, #-12] 3f8: e3530000 cmp r3, #0 3fc: ca000000 bgt 404 <gets+0x48> 400: ea000012 b 450 <gets+0x94> 404: e51b3008 ldr r3, [fp, #-8] 408: e2832001 add r2, r3, #1 40c: e50b2008 str r2, [fp, #-8] 410: e1a02003 mov r2, r3 414: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 418: e0833002 add r3, r3, r2 41c: e55b200d ldrb r2, [fp, #-13] 420: e5c32000 strb r2, [r3] 424: e55b300d ldrb r3, [fp, #-13] 428: e353000a cmp r3, #10 42c: 0a000007 beq 450 <gets+0x94> 430: e55b300d ldrb r3, [fp, #-13] 434: e353000d cmp r3, #13 438: 0a000004 beq 450 <gets+0x94> 43c: e51b3008 ldr r3, [fp, #-8] 440: e2832001 add r2, r3, #1 444: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 448: e1520003 cmp r2, r3 44c: baffffe2 blt 3dc <gets+0x20> 450: e51b3008 ldr r3, [fp, #-8] 454: e51b2018 ldr r2, [fp, #-24] ; 0xffffffe8 458: e0823003 add r3, r2, r3 45c: e3a02000 mov r2, #0 460: e5c32000 strb r2, [r3] 464: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 468: e1a00003 mov r0, r3 46c: e24bd004 sub sp, fp, #4 470: e8bd8800 pop {fp, pc} 00000474 <stat>: 474: e92d4800 push {fp, lr} 478: e28db004 add fp, sp, #4 47c: e24dd010 sub sp, sp, #16 480: e50b0010 str r0, [fp, #-16] 484: e50b1014 str r1, [fp, #-20] ; 0xffffffec 488: e51b0010 ldr r0, [fp, #-16] 48c: e3a01000 mov r1, #0 490: eb00009e bl 710 <open> 494: e50b0008 str r0, [fp, #-8] 498: e51b3008 ldr r3, [fp, #-8] 49c: e3530000 cmp r3, #0 4a0: aa000001 bge 4ac <stat+0x38> 4a4: e3e03000 mvn r3, #0 4a8: ea000006 b 4c8 <stat+0x54> 4ac: e51b0008 ldr r0, [fp, #-8] 4b0: e51b1014 ldr r1, [fp, #-20] ; 0xffffffec 4b4: eb0000b0 bl 77c <fstat> 4b8: e50b000c str r0, [fp, #-12] 4bc: e51b0008 ldr r0, [fp, #-8] 4c0: eb000077 bl 6a4 <close> 4c4: e51b300c ldr r3, [fp, #-12] 4c8: e1a00003 mov r0, r3 4cc: e24bd004 sub sp, fp, #4 4d0: e8bd8800 pop {fp, pc} 000004d4 <atoi>: 4d4: e52db004 push {fp} ; (str fp, [sp, #-4]!) 4d8: e28db000 add fp, sp, #0 4dc: e24dd014 sub sp, sp, #20 4e0: e50b0010 str r0, [fp, #-16] 4e4: e3a03000 mov r3, #0 4e8: e50b3008 str r3, [fp, #-8] 4ec: ea00000c b 524 <atoi+0x50> 4f0: e51b2008 ldr r2, [fp, #-8] 4f4: e1a03002 mov r3, r2 4f8: e1a03103 lsl r3, r3, #2 4fc: e0833002 add r3, r3, r2 500: e1a03083 lsl r3, r3, #1 504: e1a01003 mov r1, r3 508: e51b3010 ldr r3, [fp, #-16] 50c: e2832001 add r2, r3, #1 510: e50b2010 str r2, [fp, #-16] 514: e5d33000 ldrb r3, [r3] 518: e0813003 add r3, r1, r3 51c: e2433030 sub r3, r3, #48 ; 0x30 520: e50b3008 str r3, [fp, #-8] 524: e51b3010 ldr r3, [fp, #-16] 528: e5d33000 ldrb r3, [r3] 52c: e353002f cmp r3, #47 ; 0x2f 530: 9a000003 bls 544 <atoi+0x70> 534: e51b3010 ldr r3, [fp, #-16] 538: e5d33000 ldrb r3, [r3] 53c: e3530039 cmp r3, #57 ; 0x39 540: 9affffea bls 4f0 <atoi+0x1c> 544: e51b3008 ldr r3, [fp, #-8] 548: e1a00003 mov r0, r3 54c: e24bd000 sub sp, fp, #0 550: e49db004 pop {fp} ; (ldr fp, [sp], #4) 554: e12fff1e bx lr 00000558 <memmove>: 558: e52db004 push {fp} ; (str fp, [sp, #-4]!) 55c: e28db000 add fp, sp, #0 560: e24dd01c sub sp, sp, #28 564: e50b0010 str r0, [fp, #-16] 568: e50b1014 str r1, [fp, #-20] ; 0xffffffec 56c: e50b2018 str r2, [fp, #-24] ; 0xffffffe8 570: e51b3010 ldr r3, [fp, #-16] 574: e50b3008 str r3, [fp, #-8] 578: e51b3014 ldr r3, [fp, #-20] ; 0xffffffec 57c: e50b300c str r3, [fp, #-12] 580: ea000007 b 5a4 <memmove+0x4c> 584: e51b3008 ldr r3, [fp, #-8] 588: e2832001 add r2, r3, #1 58c: e50b2008 str r2, [fp, #-8] 590: e51b200c ldr r2, [fp, #-12] 594: e2821001 add r1, r2, #1 598: e50b100c str r1, [fp, #-12] 59c: e5d22000 ldrb r2, [r2] 5a0: e5c32000 strb r2, [r3] 5a4: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 5a8: e2432001 sub r2, r3, #1 5ac: e50b2018 str r2, [fp, #-24] ; 0xffffffe8 5b0: e3530000 cmp r3, #0 5b4: cafffff2 bgt 584 <memmove+0x2c> 5b8: e51b3010 ldr r3, [fp, #-16] 5bc: e1a00003 mov r0, r3 5c0: e24bd000 sub sp, fp, #0 5c4: e49db004 pop {fp} ; (ldr fp, [sp], #4) 5c8: e12fff1e bx lr 000005cc <fork>: 5cc: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 5d0: e1a04003 mov r4, r3 5d4: e1a03002 mov r3, r2 5d8: e1a02001 mov r2, r1 5dc: e1a01000 mov r1, r0 5e0: e3a00001 mov r0, #1 5e4: ef000000 svc 0x00000000 5e8: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 5ec: e12fff1e bx lr 000005f0 <exit>: 5f0: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 5f4: e1a04003 mov r4, r3 5f8: e1a03002 mov r3, r2 5fc: e1a02001 mov r2, r1 600: e1a01000 mov r1, r0 604: e3a00002 mov r0, #2 608: ef000000 svc 0x00000000 60c: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 610: e12fff1e bx lr 00000614 <wait>: 614: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 618: e1a04003 mov r4, r3 61c: e1a03002 mov r3, r2 620: e1a02001 mov r2, r1 624: e1a01000 mov r1, r0 628: e3a00003 mov r0, #3 62c: ef000000 svc 0x00000000 630: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 634: e12fff1e bx lr 00000638 <pipe>: 638: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 63c: e1a04003 mov r4, r3 640: e1a03002 mov r3, r2 644: e1a02001 mov r2, r1 648: e1a01000 mov r1, r0 64c: e3a00004 mov r0, #4 650: ef000000 svc 0x00000000 654: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 658: e12fff1e bx lr 0000065c <read>: 65c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 660: e1a04003 mov r4, r3 664: e1a03002 mov r3, r2 668: e1a02001 mov r2, r1 66c: e1a01000 mov r1, r0 670: e3a00005 mov r0, #5 674: ef000000 svc 0x00000000 678: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 67c: e12fff1e bx lr 00000680 <write>: 680: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 684: e1a04003 mov r4, r3 688: e1a03002 mov r3, r2 68c: e1a02001 mov r2, r1 690: e1a01000 mov r1, r0 694: e3a00010 mov r0, #16 698: ef000000 svc 0x00000000 69c: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 6a0: e12fff1e bx lr 000006a4 <close>: 6a4: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 6a8: e1a04003 mov r4, r3 6ac: e1a03002 mov r3, r2 6b0: e1a02001 mov r2, r1 6b4: e1a01000 mov r1, r0 6b8: e3a00015 mov r0, #21 6bc: ef000000 svc 0x00000000 6c0: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 6c4: e12fff1e bx lr 000006c8 <kill>: 6c8: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 6cc: e1a04003 mov r4, r3 6d0: e1a03002 mov r3, r2 6d4: e1a02001 mov r2, r1 6d8: e1a01000 mov r1, r0 6dc: e3a00006 mov r0, #6 6e0: ef000000 svc 0x00000000 6e4: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 6e8: e12fff1e bx lr 000006ec <exec>: 6ec: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 6f0: e1a04003 mov r4, r3 6f4: e1a03002 mov r3, r2 6f8: e1a02001 mov r2, r1 6fc: e1a01000 mov r1, r0 700: e3a00007 mov r0, #7 704: ef000000 svc 0x00000000 708: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 70c: e12fff1e bx lr 00000710 <open>: 710: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 714: e1a04003 mov r4, r3 718: e1a03002 mov r3, r2 71c: e1a02001 mov r2, r1 720: e1a01000 mov r1, r0 724: e3a0000f mov r0, #15 728: ef000000 svc 0x00000000 72c: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 730: e12fff1e bx lr 00000734 <mknod>: 734: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 738: e1a04003 mov r4, r3 73c: e1a03002 mov r3, r2 740: e1a02001 mov r2, r1 744: e1a01000 mov r1, r0 748: e3a00011 mov r0, #17 74c: ef000000 svc 0x00000000 750: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 754: e12fff1e bx lr 00000758 <unlink>: 758: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 75c: e1a04003 mov r4, r3 760: e1a03002 mov r3, r2 764: e1a02001 mov r2, r1 768: e1a01000 mov r1, r0 76c: e3a00012 mov r0, #18 770: ef000000 svc 0x00000000 774: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 778: e12fff1e bx lr 0000077c <fstat>: 77c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 780: e1a04003 mov r4, r3 784: e1a03002 mov r3, r2 788: e1a02001 mov r2, r1 78c: e1a01000 mov r1, r0 790: e3a00008 mov r0, #8 794: ef000000 svc 0x00000000 798: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 79c: e12fff1e bx lr 000007a0 <link>: 7a0: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 7a4: e1a04003 mov r4, r3 7a8: e1a03002 mov r3, r2 7ac: e1a02001 mov r2, r1 7b0: e1a01000 mov r1, r0 7b4: e3a00013 mov r0, #19 7b8: ef000000 svc 0x00000000 7bc: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 7c0: e12fff1e bx lr 000007c4 <mkdir>: 7c4: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 7c8: e1a04003 mov r4, r3 7cc: e1a03002 mov r3, r2 7d0: e1a02001 mov r2, r1 7d4: e1a01000 mov r1, r0 7d8: e3a00014 mov r0, #20 7dc: ef000000 svc 0x00000000 7e0: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 7e4: e12fff1e bx lr 000007e8 <chdir>: 7e8: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 7ec: e1a04003 mov r4, r3 7f0: e1a03002 mov r3, r2 7f4: e1a02001 mov r2, r1 7f8: e1a01000 mov r1, r0 7fc: e3a00009 mov r0, #9 800: ef000000 svc 0x00000000 804: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 808: e12fff1e bx lr 0000080c <dup>: 80c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 810: e1a04003 mov r4, r3 814: e1a03002 mov r3, r2 818: e1a02001 mov r2, r1 81c: e1a01000 mov r1, r0 820: e3a0000a mov r0, #10 824: ef000000 svc 0x00000000 828: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 82c: e12fff1e bx lr 00000830 <getpid>: 830: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 834: e1a04003 mov r4, r3 838: e1a03002 mov r3, r2 83c: e1a02001 mov r2, r1 840: e1a01000 mov r1, r0 844: e3a0000b mov r0, #11 848: ef000000 svc 0x00000000 84c: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 850: e12fff1e bx lr 00000854 <sbrk>: 854: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 858: e1a04003 mov r4, r3 85c: e1a03002 mov r3, r2 860: e1a02001 mov r2, r1 864: e1a01000 mov r1, r0 868: e3a0000c mov r0, #12 86c: ef000000 svc 0x00000000 870: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 874: e12fff1e bx lr 00000878 <sleep>: 878: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 87c: e1a04003 mov r4, r3 880: e1a03002 mov r3, r2 884: e1a02001 mov r2, r1 888: e1a01000 mov r1, r0 88c: e3a0000d mov r0, #13 890: ef000000 svc 0x00000000 894: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 898: e12fff1e bx lr 0000089c <uptime>: 89c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 8a0: e1a04003 mov r4, r3 8a4: e1a03002 mov r3, r2 8a8: e1a02001 mov r2, r1 8ac: e1a01000 mov r1, r0 8b0: e3a0000e mov r0, #14 8b4: ef000000 svc 0x00000000 8b8: e49d4004 pop {r4} ; (ldr r4, [sp], #4) 8bc: e12fff1e bx lr 000008c0 <putc>: 8c0: e92d4800 push {fp, lr} 8c4: e28db004 add fp, sp, #4 8c8: e24dd008 sub sp, sp, #8 8cc: e50b0008 str r0, [fp, #-8] 8d0: e1a03001 mov r3, r1 8d4: e54b3009 strb r3, [fp, #-9] 8d8: e24b3009 sub r3, fp, #9 8dc: e51b0008 ldr r0, [fp, #-8] 8e0: e1a01003 mov r1, r3 8e4: e3a02001 mov r2, #1 8e8: ebffff64 bl 680 <write> 8ec: e24bd004 sub sp, fp, #4 8f0: e8bd8800 pop {fp, pc} 000008f4 <printint>: 8f4: e92d4810 push {r4, fp, lr} 8f8: e28db008 add fp, sp, #8 8fc: e24dd034 sub sp, sp, #52 ; 0x34 900: e50b0030 str r0, [fp, #-48] ; 0xffffffd0 904: e50b1034 str r1, [fp, #-52] ; 0xffffffcc 908: e50b2038 str r2, [fp, #-56] ; 0xffffffc8 90c: e50b303c str r3, [fp, #-60] ; 0xffffffc4 910: e3a03000 mov r3, #0 914: e50b3014 str r3, [fp, #-20] ; 0xffffffec 918: e51b303c ldr r3, [fp, #-60] ; 0xffffffc4 91c: e3530000 cmp r3, #0 920: 0a000008 beq 948 <printint+0x54> 924: e51b3034 ldr r3, [fp, #-52] ; 0xffffffcc 928: e3530000 cmp r3, #0 92c: aa000005 bge 948 <printint+0x54> 930: e3a03001 mov r3, #1 934: e50b3014 str r3, [fp, #-20] ; 0xffffffec 938: e51b3034 ldr r3, [fp, #-52] ; 0xffffffcc 93c: e2633000 rsb r3, r3, #0 940: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 944: ea000001 b 950 <printint+0x5c> 948: e51b3034 ldr r3, [fp, #-52] ; 0xffffffcc 94c: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 950: e3a03000 mov r3, #0 954: e50b3010 str r3, [fp, #-16] 958: e51b4010 ldr r4, [fp, #-16] 95c: e2843001 add r3, r4, #1 960: e50b3010 str r3, [fp, #-16] 964: e51b3038 ldr r3, [fp, #-56] ; 0xffffffc8 968: e51b2018 ldr r2, [fp, #-24] ; 0xffffffe8 96c: e1a00002 mov r0, r2 970: e1a01003 mov r1, r3 974: eb0001cd bl 10b0 <__aeabi_uidivmod> 978: e1a03001 mov r3, r1 97c: e1a02003 mov r2, r3 980: e59f3098 ldr r3, [pc, #152] ; a20 <printint+0x12c> 984: e7d32002 ldrb r2, [r3, r2] 988: e24b300c sub r3, fp, #12 98c: e0833004 add r3, r3, r4 990: e543201c strb r2, [r3, #-28] ; 0xffffffe4 994: e51b3038 ldr r3, [fp, #-56] ; 0xffffffc8 998: e51b0018 ldr r0, [fp, #-24] ; 0xffffffe8 99c: e1a01003 mov r1, r3 9a0: eb000185 bl fbc <__aeabi_uidiv> 9a4: e1a03000 mov r3, r0 9a8: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 9ac: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 9b0: e3530000 cmp r3, #0 9b4: 1affffe7 bne 958 <printint+0x64> 9b8: e51b3014 ldr r3, [fp, #-20] ; 0xffffffec 9bc: e3530000 cmp r3, #0 9c0: 0a000006 beq 9e0 <printint+0xec> 9c4: e51b3010 ldr r3, [fp, #-16] 9c8: e2832001 add r2, r3, #1 9cc: e50b2010 str r2, [fp, #-16] 9d0: e24b200c sub r2, fp, #12 9d4: e0823003 add r3, r2, r3 9d8: e3a0202d mov r2, #45 ; 0x2d 9dc: e543201c strb r2, [r3, #-28] ; 0xffffffe4 9e0: ea000006 b a00 <printint+0x10c> 9e4: e24b2028 sub r2, fp, #40 ; 0x28 9e8: e51b3010 ldr r3, [fp, #-16] 9ec: e0823003 add r3, r2, r3 9f0: e5d33000 ldrb r3, [r3] 9f4: e51b0030 ldr r0, [fp, #-48] ; 0xffffffd0 9f8: e1a01003 mov r1, r3 9fc: ebffffaf bl 8c0 <putc> a00: e51b3010 ldr r3, [fp, #-16] a04: e2433001 sub r3, r3, #1 a08: e50b3010 str r3, [fp, #-16] a0c: e51b3010 ldr r3, [fp, #-16] a10: e3530000 cmp r3, #0 a14: aafffff2 bge 9e4 <printint+0xf0> a18: e24bd008 sub sp, fp, #8 a1c: e8bd8810 pop {r4, fp, pc} a20: 0000113c .word 0x0000113c 00000a24 <printf>: a24: e92d000e push {r1, r2, r3} a28: e92d4800 push {fp, lr} a2c: e28db004 add fp, sp, #4 a30: e24dd024 sub sp, sp, #36 ; 0x24 a34: e50b0024 str r0, [fp, #-36] ; 0xffffffdc a38: e3a03000 mov r3, #0 a3c: e50b3014 str r3, [fp, #-20] ; 0xffffffec a40: e28b3008 add r3, fp, #8 a44: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 a48: e3a03000 mov r3, #0 a4c: e50b3010 str r3, [fp, #-16] a50: ea000074 b c28 <printf+0x204> a54: e59b2004 ldr r2, [fp, #4] a58: e51b3010 ldr r3, [fp, #-16] a5c: e0823003 add r3, r2, r3 a60: e5d33000 ldrb r3, [r3] a64: e50b301c str r3, [fp, #-28] ; 0xffffffe4 a68: e51b3014 ldr r3, [fp, #-20] ; 0xffffffec a6c: e3530000 cmp r3, #0 a70: 1a00000b bne aa4 <printf+0x80> a74: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 a78: e3530025 cmp r3, #37 ; 0x25 a7c: 1a000002 bne a8c <printf+0x68> a80: e3a03025 mov r3, #37 ; 0x25 a84: e50b3014 str r3, [fp, #-20] ; 0xffffffec a88: ea000063 b c1c <printf+0x1f8> a8c: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 a90: e6ef3073 uxtb r3, r3 a94: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc a98: e1a01003 mov r1, r3 a9c: ebffff87 bl 8c0 <putc> aa0: ea00005d b c1c <printf+0x1f8> aa4: e51b3014 ldr r3, [fp, #-20] ; 0xffffffec aa8: e3530025 cmp r3, #37 ; 0x25 aac: 1a00005a bne c1c <printf+0x1f8> ab0: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 ab4: e3530064 cmp r3, #100 ; 0x64 ab8: 1a00000a bne ae8 <printf+0xc4> abc: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 ac0: e5933000 ldr r3, [r3] ac4: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc ac8: e1a01003 mov r1, r3 acc: e3a0200a mov r2, #10 ad0: e3a03001 mov r3, #1 ad4: ebffff86 bl 8f4 <printint> ad8: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 adc: e2833004 add r3, r3, #4 ae0: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 ae4: ea00004a b c14 <printf+0x1f0> ae8: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 aec: e3530078 cmp r3, #120 ; 0x78 af0: 0a000002 beq b00 <printf+0xdc> af4: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 af8: e3530070 cmp r3, #112 ; 0x70 afc: 1a00000a bne b2c <printf+0x108> b00: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 b04: e5933000 ldr r3, [r3] b08: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc b0c: e1a01003 mov r1, r3 b10: e3a02010 mov r2, #16 b14: e3a03000 mov r3, #0 b18: ebffff75 bl 8f4 <printint> b1c: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 b20: e2833004 add r3, r3, #4 b24: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 b28: ea000039 b c14 <printf+0x1f0> b2c: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 b30: e3530073 cmp r3, #115 ; 0x73 b34: 1a000018 bne b9c <printf+0x178> b38: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 b3c: e5933000 ldr r3, [r3] b40: e50b300c str r3, [fp, #-12] b44: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 b48: e2833004 add r3, r3, #4 b4c: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 b50: e51b300c ldr r3, [fp, #-12] b54: e3530000 cmp r3, #0 b58: 1a000001 bne b64 <printf+0x140> b5c: e59f30ec ldr r3, [pc, #236] ; c50 <printf+0x22c> b60: e50b300c str r3, [fp, #-12] b64: ea000007 b b88 <printf+0x164> b68: e51b300c ldr r3, [fp, #-12] b6c: e5d33000 ldrb r3, [r3] b70: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc b74: e1a01003 mov r1, r3 b78: ebffff50 bl 8c0 <putc> b7c: e51b300c ldr r3, [fp, #-12] b80: e2833001 add r3, r3, #1 b84: e50b300c str r3, [fp, #-12] b88: e51b300c ldr r3, [fp, #-12] b8c: e5d33000 ldrb r3, [r3] b90: e3530000 cmp r3, #0 b94: 1afffff3 bne b68 <printf+0x144> b98: ea00001d b c14 <printf+0x1f0> b9c: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 ba0: e3530063 cmp r3, #99 ; 0x63 ba4: 1a000009 bne bd0 <printf+0x1ac> ba8: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 bac: e5933000 ldr r3, [r3] bb0: e6ef3073 uxtb r3, r3 bb4: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc bb8: e1a01003 mov r1, r3 bbc: ebffff3f bl 8c0 <putc> bc0: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 bc4: e2833004 add r3, r3, #4 bc8: e50b3018 str r3, [fp, #-24] ; 0xffffffe8 bcc: ea000010 b c14 <printf+0x1f0> bd0: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 bd4: e3530025 cmp r3, #37 ; 0x25 bd8: 1a000005 bne bf4 <printf+0x1d0> bdc: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 be0: e6ef3073 uxtb r3, r3 be4: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc be8: e1a01003 mov r1, r3 bec: ebffff33 bl 8c0 <putc> bf0: ea000007 b c14 <printf+0x1f0> bf4: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc bf8: e3a01025 mov r1, #37 ; 0x25 bfc: ebffff2f bl 8c0 <putc> c00: e51b301c ldr r3, [fp, #-28] ; 0xffffffe4 c04: e6ef3073 uxtb r3, r3 c08: e51b0024 ldr r0, [fp, #-36] ; 0xffffffdc c0c: e1a01003 mov r1, r3 c10: ebffff2a bl 8c0 <putc> c14: e3a03000 mov r3, #0 c18: e50b3014 str r3, [fp, #-20] ; 0xffffffec c1c: e51b3010 ldr r3, [fp, #-16] c20: e2833001 add r3, r3, #1 c24: e50b3010 str r3, [fp, #-16] c28: e59b2004 ldr r2, [fp, #4] c2c: e51b3010 ldr r3, [fp, #-16] c30: e0823003 add r3, r2, r3 c34: e5d33000 ldrb r3, [r3] c38: e3530000 cmp r3, #0 c3c: 1affff84 bne a54 <printf+0x30> c40: e24bd004 sub sp, fp, #4 c44: e8bd4800 pop {fp, lr} c48: e28dd00c add sp, sp, #12 c4c: e12fff1e bx lr c50: 0000112c .word 0x0000112c 00000c54 <free>: c54: e52db004 push {fp} ; (str fp, [sp, #-4]!) c58: e28db000 add fp, sp, #0 c5c: e24dd014 sub sp, sp, #20 c60: e50b0010 str r0, [fp, #-16] c64: e51b3010 ldr r3, [fp, #-16] c68: e2433008 sub r3, r3, #8 c6c: e50b300c str r3, [fp, #-12] c70: e59f3150 ldr r3, [pc, #336] ; dc8 <free+0x174> c74: e5933000 ldr r3, [r3] c78: e50b3008 str r3, [fp, #-8] c7c: ea000010 b cc4 <free+0x70> c80: e51b3008 ldr r3, [fp, #-8] c84: e5932000 ldr r2, [r3] c88: e51b3008 ldr r3, [fp, #-8] c8c: e1520003 cmp r2, r3 c90: 8a000008 bhi cb8 <free+0x64> c94: e51b200c ldr r2, [fp, #-12] c98: e51b3008 ldr r3, [fp, #-8] c9c: e1520003 cmp r2, r3 ca0: 8a000010 bhi ce8 <free+0x94> ca4: e51b3008 ldr r3, [fp, #-8] ca8: e5932000 ldr r2, [r3] cac: e51b300c ldr r3, [fp, #-12] cb0: e1520003 cmp r2, r3 cb4: 8a00000b bhi ce8 <free+0x94> cb8: e51b3008 ldr r3, [fp, #-8] cbc: e5933000 ldr r3, [r3] cc0: e50b3008 str r3, [fp, #-8] cc4: e51b200c ldr r2, [fp, #-12] cc8: e51b3008 ldr r3, [fp, #-8] ccc: e1520003 cmp r2, r3 cd0: 9affffea bls c80 <free+0x2c> cd4: e51b3008 ldr r3, [fp, #-8] cd8: e5932000 ldr r2, [r3] cdc: e51b300c ldr r3, [fp, #-12] ce0: e1520003 cmp r2, r3 ce4: 9affffe5 bls c80 <free+0x2c> ce8: e51b300c ldr r3, [fp, #-12] cec: e5933004 ldr r3, [r3, #4] cf0: e1a03183 lsl r3, r3, #3 cf4: e51b200c ldr r2, [fp, #-12] cf8: e0822003 add r2, r2, r3 cfc: e51b3008 ldr r3, [fp, #-8] d00: e5933000 ldr r3, [r3] d04: e1520003 cmp r2, r3 d08: 1a00000d bne d44 <free+0xf0> d0c: e51b300c ldr r3, [fp, #-12] d10: e5932004 ldr r2, [r3, #4] d14: e51b3008 ldr r3, [fp, #-8] d18: e5933000 ldr r3, [r3] d1c: e5933004 ldr r3, [r3, #4] d20: e0822003 add r2, r2, r3 d24: e51b300c ldr r3, [fp, #-12] d28: e5832004 str r2, [r3, #4] d2c: e51b3008 ldr r3, [fp, #-8] d30: e5933000 ldr r3, [r3] d34: e5932000 ldr r2, [r3] d38: e51b300c ldr r3, [fp, #-12] d3c: e5832000 str r2, [r3] d40: ea000003 b d54 <free+0x100> d44: e51b3008 ldr r3, [fp, #-8] d48: e5932000 ldr r2, [r3] d4c: e51b300c ldr r3, [fp, #-12] d50: e5832000 str r2, [r3] d54: e51b3008 ldr r3, [fp, #-8] d58: e5933004 ldr r3, [r3, #4] d5c: e1a03183 lsl r3, r3, #3 d60: e51b2008 ldr r2, [fp, #-8] d64: e0822003 add r2, r2, r3 d68: e51b300c ldr r3, [fp, #-12] d6c: e1520003 cmp r2, r3 d70: 1a00000b bne da4 <free+0x150> d74: e51b3008 ldr r3, [fp, #-8] d78: e5932004 ldr r2, [r3, #4] d7c: e51b300c ldr r3, [fp, #-12] d80: e5933004 ldr r3, [r3, #4] d84: e0822003 add r2, r2, r3 d88: e51b3008 ldr r3, [fp, #-8] d8c: e5832004 str r2, [r3, #4] d90: e51b300c ldr r3, [fp, #-12] d94: e5932000 ldr r2, [r3] d98: e51b3008 ldr r3, [fp, #-8] d9c: e5832000 str r2, [r3] da0: ea000002 b db0 <free+0x15c> da4: e51b3008 ldr r3, [fp, #-8] da8: e51b200c ldr r2, [fp, #-12] dac: e5832000 str r2, [r3] db0: e59f2010 ldr r2, [pc, #16] ; dc8 <free+0x174> db4: e51b3008 ldr r3, [fp, #-8] db8: e5823000 str r3, [r2] dbc: e24bd000 sub sp, fp, #0 dc0: e49db004 pop {fp} ; (ldr fp, [sp], #4) dc4: e12fff1e bx lr dc8: 00001158 .word 0x00001158 00000dcc <morecore>: dcc: e92d4800 push {fp, lr} dd0: e28db004 add fp, sp, #4 dd4: e24dd010 sub sp, sp, #16 dd8: e50b0010 str r0, [fp, #-16] ddc: e51b3010 ldr r3, [fp, #-16] de0: e3530a01 cmp r3, #4096 ; 0x1000 de4: 2a000001 bcs df0 <morecore+0x24> de8: e3a03a01 mov r3, #4096 ; 0x1000 dec: e50b3010 str r3, [fp, #-16] df0: e51b3010 ldr r3, [fp, #-16] df4: e1a03183 lsl r3, r3, #3 df8: e1a00003 mov r0, r3 dfc: ebfffe94 bl 854 <sbrk> e00: e50b0008 str r0, [fp, #-8] e04: e51b3008 ldr r3, [fp, #-8] e08: e3730001 cmn r3, #1 e0c: 1a000001 bne e18 <morecore+0x4c> e10: e3a03000 mov r3, #0 e14: ea00000a b e44 <morecore+0x78> e18: e51b3008 ldr r3, [fp, #-8] e1c: e50b300c str r3, [fp, #-12] e20: e51b300c ldr r3, [fp, #-12] e24: e51b2010 ldr r2, [fp, #-16] e28: e5832004 str r2, [r3, #4] e2c: e51b300c ldr r3, [fp, #-12] e30: e2833008 add r3, r3, #8 e34: e1a00003 mov r0, r3 e38: ebffff85 bl c54 <free> e3c: e59f300c ldr r3, [pc, #12] ; e50 <morecore+0x84> e40: e5933000 ldr r3, [r3] e44: e1a00003 mov r0, r3 e48: e24bd004 sub sp, fp, #4 e4c: e8bd8800 pop {fp, pc} e50: 00001158 .word 0x00001158 00000e54 <malloc>: e54: e92d4800 push {fp, lr} e58: e28db004 add fp, sp, #4 e5c: e24dd018 sub sp, sp, #24 e60: e50b0018 str r0, [fp, #-24] ; 0xffffffe8 e64: e51b3018 ldr r3, [fp, #-24] ; 0xffffffe8 e68: e2833007 add r3, r3, #7 e6c: e1a031a3 lsr r3, r3, #3 e70: e2833001 add r3, r3, #1 e74: e50b3010 str r3, [fp, #-16] e78: e59f3134 ldr r3, [pc, #308] ; fb4 <malloc+0x160> e7c: e5933000 ldr r3, [r3] e80: e50b300c str r3, [fp, #-12] e84: e51b300c ldr r3, [fp, #-12] e88: e3530000 cmp r3, #0 e8c: 1a00000b bne ec0 <malloc+0x6c> e90: e59f3120 ldr r3, [pc, #288] ; fb8 <malloc+0x164> e94: e50b300c str r3, [fp, #-12] e98: e59f2114 ldr r2, [pc, #276] ; fb4 <malloc+0x160> e9c: e51b300c ldr r3, [fp, #-12] ea0: e5823000 str r3, [r2] ea4: e59f3108 ldr r3, [pc, #264] ; fb4 <malloc+0x160> ea8: e5933000 ldr r3, [r3] eac: e59f2104 ldr r2, [pc, #260] ; fb8 <malloc+0x164> eb0: e5823000 str r3, [r2] eb4: e59f30fc ldr r3, [pc, #252] ; fb8 <malloc+0x164> eb8: e3a02000 mov r2, #0 ebc: e5832004 str r2, [r3, #4] ec0: e51b300c ldr r3, [fp, #-12] ec4: e5933000 ldr r3, [r3] ec8: e50b3008 str r3, [fp, #-8] ecc: e51b3008 ldr r3, [fp, #-8] ed0: e5932004 ldr r2, [r3, #4] ed4: e51b3010 ldr r3, [fp, #-16] ed8: e1520003 cmp r2, r3 edc: 3a00001e bcc f5c <malloc+0x108> ee0: e51b3008 ldr r3, [fp, #-8] ee4: e5932004 ldr r2, [r3, #4] ee8: e51b3010 ldr r3, [fp, #-16] eec: e1520003 cmp r2, r3 ef0: 1a000004 bne f08 <malloc+0xb4> ef4: e51b3008 ldr r3, [fp, #-8] ef8: e5932000 ldr r2, [r3] efc: e51b300c ldr r3, [fp, #-12] f00: e5832000 str r2, [r3] f04: ea00000e b f44 <malloc+0xf0> f08: e51b3008 ldr r3, [fp, #-8] f0c: e5932004 ldr r2, [r3, #4] f10: e51b3010 ldr r3, [fp, #-16] f14: e0632002 rsb r2, r3, r2 f18: e51b3008 ldr r3, [fp, #-8] f1c: e5832004 str r2, [r3, #4] f20: e51b3008 ldr r3, [fp, #-8] f24: e5933004 ldr r3, [r3, #4] f28: e1a03183 lsl r3, r3, #3 f2c: e51b2008 ldr r2, [fp, #-8] f30: e0823003 add r3, r2, r3 f34: e50b3008 str r3, [fp, #-8] f38: e51b3008 ldr r3, [fp, #-8] f3c: e51b2010 ldr r2, [fp, #-16] f40: e5832004 str r2, [r3, #4] f44: e59f2068 ldr r2, [pc, #104] ; fb4 <malloc+0x160> f48: e51b300c ldr r3, [fp, #-12] f4c: e5823000 str r3, [r2] f50: e51b3008 ldr r3, [fp, #-8] f54: e2833008 add r3, r3, #8 f58: ea000012 b fa8 <malloc+0x154> f5c: e59f3050 ldr r3, [pc, #80] ; fb4 <malloc+0x160> f60: e5933000 ldr r3, [r3] f64: e51b2008 ldr r2, [fp, #-8] f68: e1520003 cmp r2, r3 f6c: 1a000007 bne f90 <malloc+0x13c> f70: e51b0010 ldr r0, [fp, #-16] f74: ebffff94 bl dcc <morecore> f78: e50b0008 str r0, [fp, #-8] f7c: e51b3008 ldr r3, [fp, #-8] f80: e3530000 cmp r3, #0 f84: 1a000001 bne f90 <malloc+0x13c> f88: e3a03000 mov r3, #0 f8c: ea000005 b fa8 <malloc+0x154> f90: e51b3008 ldr r3, [fp, #-8] f94: e50b300c str r3, [fp, #-12] f98: e51b3008 ldr r3, [fp, #-8] f9c: e5933000 ldr r3, [r3] fa0: e50b3008 str r3, [fp, #-8] fa4: eaffffc8 b ecc <malloc+0x78> fa8: e1a00003 mov r0, r3 fac: e24bd004 sub sp, fp, #4 fb0: e8bd8800 pop {fp, pc} fb4: 00001158 .word 0x00001158 fb8: 00001150 .word 0x00001150 00000fbc <__aeabi_uidiv>: fbc: e2512001 subs r2, r1, #1 fc0: 012fff1e bxeq lr fc4: 3a000036 bcc 10a4 <__aeabi_uidiv+0xe8> fc8: e1500001 cmp r0, r1 fcc: 9a000022 bls 105c <__aeabi_uidiv+0xa0> fd0: e1110002 tst r1, r2 fd4: 0a000023 beq 1068 <__aeabi_uidiv+0xac> fd8: e311020e tst r1, #-536870912 ; 0xe0000000 fdc: 01a01181 lsleq r1, r1, #3 fe0: 03a03008 moveq r3, #8 fe4: 13a03001 movne r3, #1 fe8: e3510201 cmp r1, #268435456 ; 0x10000000 fec: 31510000 cmpcc r1, r0 ff0: 31a01201 lslcc r1, r1, #4 ff4: 31a03203 lslcc r3, r3, #4 ff8: 3afffffa bcc fe8 <__aeabi_uidiv+0x2c> ffc: e3510102 cmp r1, #-2147483648 ; 0x80000000 1000: 31510000 cmpcc r1, r0 1004: 31a01081 lslcc r1, r1, #1 1008: 31a03083 lslcc r3, r3, #1 100c: 3afffffa bcc ffc <__aeabi_uidiv+0x40> 1010: e3a02000 mov r2, #0 1014: e1500001 cmp r0, r1 1018: 20400001 subcs r0, r0, r1 101c: 21822003 orrcs r2, r2, r3 1020: e15000a1 cmp r0, r1, lsr #1 1024: 204000a1 subcs r0, r0, r1, lsr #1 1028: 218220a3 orrcs r2, r2, r3, lsr #1 102c: e1500121 cmp r0, r1, lsr #2 1030: 20400121 subcs r0, r0, r1, lsr #2 1034: 21822123 orrcs r2, r2, r3, lsr #2 1038: e15001a1 cmp r0, r1, lsr #3 103c: 204001a1 subcs r0, r0, r1, lsr #3 1040: 218221a3 orrcs r2, r2, r3, lsr #3 1044: e3500000 cmp r0, #0 1048: 11b03223 lsrsne r3, r3, #4 104c: 11a01221 lsrne r1, r1, #4 1050: 1affffef bne 1014 <__aeabi_uidiv+0x58> 1054: e1a00002 mov r0, r2 1058: e12fff1e bx lr 105c: 03a00001 moveq r0, #1 1060: 13a00000 movne r0, #0 1064: e12fff1e bx lr 1068: e3510801 cmp r1, #65536 ; 0x10000 106c: 21a01821 lsrcs r1, r1, #16 1070: 23a02010 movcs r2, #16 1074: 33a02000 movcc r2, #0 1078: e3510c01 cmp r1, #256 ; 0x100 107c: 21a01421 lsrcs r1, r1, #8 1080: 22822008 addcs r2, r2, #8 1084: e3510010 cmp r1, #16 1088: 21a01221 lsrcs r1, r1, #4 108c: 22822004 addcs r2, r2, #4 1090: e3510004 cmp r1, #4 1094: 82822003 addhi r2, r2, #3 1098: 908220a1 addls r2, r2, r1, lsr #1 109c: e1a00230 lsr r0, r0, r2 10a0: e12fff1e bx lr 10a4: e3500000 cmp r0, #0 10a8: 13e00000 mvnne r0, #0 10ac: ea000007 b 10d0 <__aeabi_idiv0> 000010b0 <__aeabi_uidivmod>: 10b0: e3510000 cmp r1, #0 10b4: 0afffffa beq 10a4 <__aeabi_uidiv+0xe8> 10b8: e92d4003 push {r0, r1, lr} 10bc: ebffffbe bl fbc <__aeabi_uidiv> 10c0: e8bd4006 pop {r1, r2, lr} 10c4: e0030092 mul r3, r2, r0 10c8: e0411003 sub r1, r1, r3 10cc: e12fff1e bx lr 000010d0 <__aeabi_idiv0>: 10d0: e12fff1e bx lr
constants/type_constants.asm
AtmaBuster/pokeplat-gen2
6
162999
<reponame>AtmaBuster/pokeplat-gen2 ; TypeNames indexes (see data/types/names.asm) ; also used in: ; - PokedexTypeSearchConversionTable (see data/types/search_types.asm) ; - PokedexTypeSearchStrings (see data/types/search_strings.asm) ; - TypeMatchups (see data/types/type_matchups.asm) ; - TypeBoostItems (see data/types/type_boost_items.asm) const_def const NORMAL ; 00 const FIGHTING ; 01 const FLYING ; 02 const POISON ; 03 const GROUND ; 04 const ROCK ; 05 const BIRD ; 06 const BUG ; 07 const GHOST ; 08 const STEEL ; 09 UNUSED_TYPES EQU const_value const TYPE_10 ; 0a const TYPE_11 ; 0b const TYPE_12 ; 0c const TYPE_13 ; 0d const TYPE_14 ; 0e const TYPE_15 ; 0f const TYPE_16 ; 10 const TYPE_17 ; 11 const TYPE_18 ; 12 const CURSE_T ; 13 UNUSED_TYPES_END EQU const_value const FIRE ; 14 const WATER ; 15 const GRASS ; 16 const ELECTRIC ; 17 const PSYCHIC ; 18 const ICE ; 19 const DRAGON ; 1a const DARK ; 1b TYPES_END EQU const_value NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END TYPE_MASK EQU %00111111 CATEGORY_MASK EQU %11000000 PHYSICAL EQU %01000000 SPECIAL EQU %10000000 STATUS EQU %11000000
programs/oeis/127/A127736.asm
neoneye/loda
22
163562
<reponame>neoneye/loda ; A127736: a(n) = n*(n^2+2*n-1)/2. ; 1,7,21,46,85,141,217,316,441,595,781,1002,1261,1561,1905,2296,2737,3231,3781,4390,5061,5797,6601,7476,8425,9451,10557,11746,13021,14385,15841,17392,19041,20791,22645,24606,26677,28861,31161,33580,36121,38787,41581,44506,47565,50761,54097,57576,61201,64975,68901,72982,77221,81621,86185,90916,95817,100891,106141,111570,117181,122977,128961,135136,141505,148071,154837,161806,168981,176365,183961,191772,199801,208051,216525,225226,234157,243321,252721,262360,272241,282367,292741,303366,314245,325381,336777,348436,360361,372555,385021,397762,410781,424081,437665,451536,465697,480151,494901,509950 mov $1,$0 add $1,3 bin $1,2 mul $0,$1 add $0,1
programs/oeis/280/A280304.asm
karttu/loda
1
86032
<gh_stars>1-10 ; A280304: a(n) = 3*n*(n^2 + 3*n + 4). ; 0,24,84,198,384,660,1044,1554,2208,3024,4020,5214,6624,8268,10164,12330,14784,17544,20628,24054,27840,32004,36564,41538,46944,52800,59124,65934,73248,81084,89460,98394,107904,118008,128724,140070,152064,164724,178068,192114,206880,222384,238644,255678,273504,292140,311604,331914,353088,375144,398100,421974,446784,472548,499284,527010,555744,585504,616308,648174,681120,715164,750324,786618,824064,862680,902484,943494,985728,1029204,1073940,1119954,1167264,1215888,1265844,1317150,1369824,1423884,1479348,1536234,1594560,1654344,1715604,1778358,1842624,1908420,1975764,2044674,2115168,2187264,2260980,2336334,2413344,2492028,2572404,2654490,2738304,2823864,2911188,3000294,3091200,3183924,3278484,3374898,3473184,3573360,3675444,3779454,3885408,3993324,4103220,4215114,4329024,4444968,4562964,4683030,4805184,4929444,5055828,5184354,5315040,5447904,5582964,5720238,5859744,6001500,6145524,6291834,6440448,6591384,6744660,6900294,7058304,7218708,7381524,7546770,7714464,7884624,8057268,8232414,8410080,8590284,8773044,8958378,9146304,9336840,9530004,9725814,9924288,10125444,10329300,10535874,10745184,10957248,11172084,11389710,11610144,11833404,12059508,12288474,12520320,12755064,12992724,13233318,13476864,13723380,13972884,14225394,14480928,14739504,15001140,15265854,15533664,15804588,16078644,16355850,16636224,16919784,17206548,17496534,17789760,18086244,18386004,18689058,18995424,19305120,19618164,19934574,20254368,20577564,20904180,21234234,21567744,21904728,22245204,22589190,22936704,23287764,23642388,24000594,24362400,24727824,25096884,25469598,25845984,26226060,26609844,26997354,27388608,27783624,28182420,28585014,28991424,29401668,29815764,30233730,30655584,31081344,31511028,31944654,32382240,32823804,33269364,33718938,34172544,34630200,35091924,35557734,36027648,36501684,36979860,37462194,37948704,38439408,38934324,39433470,39936864,40444524,40956468,41472714,41993280,42518184,43047444,43581078,44119104,44661540,45208404,45759714,46315488,46875744 mov $1,$0 add $1,1 pow $1,3 add $1,$0 div $1,2 mul $1,6
src/lib/filterexpressions/FilterExpressionSyntax.g4
sttpshark/cppapi
0
4613
//****************************************************************************************************** // FilterExpressionSyntax.g4 - Gbtc // // Copyright © 2019, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this // file except in compliance with the License. You may obtain a copy of the License at: // // http://opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 10/27/2018 - <NAME> // Generated original version of source code. // //****************************************************************************************************** grammar FilterExpressionSyntax; parse : ( filterExpressionStatementList | error ) EOF ; error : UNEXPECTED_CHAR { throw RuntimeException("Unexpected character: " + $UNEXPECTED_CHAR.text); } ; filterExpressionStatementList : ';'* filterExpressionStatement ( ';'+ filterExpressionStatement )* ';'* ; filterExpressionStatement : identifierStatement | filterStatement | expression ; identifierStatement : GUID_LITERAL | MEASUREMENT_KEY_LITERAL | POINT_TAG_LITERAL ; filterStatement : K_FILTER ( K_TOP topLimit )? tableName K_WHERE expression ( K_ORDER K_BY orderingTerm ( ',' orderingTerm )* )? ; topLimit : ( '-' | '+' )? INTEGER_LITERAL ; orderingTerm : exactMatchModifier? orderByColumnName ( K_ASC | K_DESC )? ; expressionList : expression ( ',' expression )* ; /* Expressions understand the following binary operators, in order from highest to lowest precedence: * / % + - << >> & | < <= > >= = == === != !== <> IS NULL IN LIKE AND && OR || */ expression : notOperator expression | expression logicalOperator expression | predicateExpression ; predicateExpression : predicateExpression notOperator? K_IN exactMatchModifier? '(' expressionList ')' | predicateExpression K_IS notOperator? K_NULL | predicateExpression comparisonOperator predicateExpression | predicateExpression notOperator? K_LIKE exactMatchModifier? predicateExpression | valueExpression ; valueExpression : literalValue | columnName | functionExpression | unaryOperator valueExpression | '(' expression ')' | valueExpression mathOperator valueExpression | valueExpression bitwiseOperator valueExpression ; notOperator : K_NOT | '!' ; unaryOperator : '-' | '+' | '~' | '!' | K_NOT ; exactMatchModifier : K_BINARY | '===' ; // === and !== are for case sensitive string match comparisonOperator : '<' | '<=' | '>' | '>=' | '=' | '==' | '===' | '!='| '!==' | '<>' ; logicalOperator : K_AND | '&&' | K_OR | '||' ; bitwiseOperator : '<<' | '>>' | '&' | '|' | K_XOR | '^' ; mathOperator : '*' | '/' | '%' | '+' | '-' ; functionName : K_ABS | K_CEILING | K_COALESCE | K_CONVERT | K_CONTAINS | K_DATEADD | K_DATEDIFF | K_DATEPART | K_ENDSWITH | K_FLOOR | K_IIF | K_INDEXOF | K_ISDATE | K_ISINTEGER | K_ISGUID | K_ISNULL | K_ISNUMERIC | K_LASTINDEXOF | K_LEN | K_LOWER | K_MAXOF | K_MINOF | K_NOW | K_NTHINDEXOF | K_POWER | K_REGEXMATCH | K_REGEXVAL | K_REPLACE | K_REVERSE | K_ROUND | K_SPLIT | K_SQRT | K_STARTSWITH | K_STRCOUNT | K_STRCMP | K_SUBSTR | K_TRIM | K_TRIMLEFT | K_TRIMRIGHT | K_UPPER | K_UTCNOW ; functionExpression : functionName '(' expressionList? ')' ; literalValue : INTEGER_LITERAL | NUMERIC_LITERAL | STRING_LITERAL | DATETIME_LITERAL | GUID_LITERAL | BOOLEAN_LITERAL | K_NULL ; tableName : IDENTIFIER ; columnName : IDENTIFIER ; orderByColumnName : IDENTIFIER ; // Terminals for keywords should come before terminals with pattern expressions // Keywords K_ABS: A B S; K_AND : A N D; K_ASC : A S C; K_BINARY : B I N A R Y; K_BY : B Y; K_CEILING : C E I L I N G; K_COALESCE : C O A L E S C E; K_CONVERT : C O N V E R T; K_CONTAINS : C O N T A I N S; K_DATEADD : D A T E A D D; K_DATEDIFF : D A T E D I F F; K_DATEPART : D A T E P A R T; K_DESC : D E S C; K_ENDSWITH : E N D S W I T H; K_FILTER : F I L T E R; K_FLOOR : F L O O R; K_IIF : I I F; K_IN : I N; K_INDEXOF : I N D E X O F; K_IS : I S; K_ISDATE : I S D A T E; K_ISINTEGER : I S I N T E G E R; K_ISGUID : I S G U I D; K_ISNULL : I S N U L L; K_ISNUMERIC : I S N U M E R I C; K_LASTINDEXOF : L A S T I N D E X O F; K_LEN : L E N; K_LIKE : L I K E; K_LOWER : L O W E R; K_MAXOF : M A X O F; K_MINOF : M I N O F; K_NOT : N O T; K_NOW : N O W; K_NTHINDEXOF : N T H I N D E X O F; K_NULL : N U L L; K_OR : O R; K_ORDER : O R D E R; K_POWER : P O W E R; K_REGEXMATCH : R E G E X M A T C H; K_REGEXVAL : R E G E X V A L; K_REPLACE : R E P L A C E; K_REVERSE : R E V E R S E; K_ROUND : R O U N D; K_SQRT : S Q R T; K_SPLIT : S P L I T; K_STARTSWITH : S T A R T S W I T H; K_STRCOUNT : S T R C O U N T; K_STRCMP: S T R C M P; K_SUBSTR: S U B S T R; K_TOP : T O P; K_TRIM : T R I M; K_TRIMLEFT : T R I M L E F T; K_TRIMRIGHT : T R I M R I G H T; K_UPPER : U P P E R; K_UTCNOW : U T C N O W; K_WHERE : W H E R E; K_XOR : X O R; BOOLEAN_LITERAL : T R U E | F A L S E ; IDENTIFIER : '`' ( ~'`' )+ '`' | '[' ( ~']' )+ ']' | [a-zA-Z_] [a-zA-Z_0-9]* // TODO check: needs more chars in set ; INTEGER_LITERAL : DIGIT+ | '0' X HEX_DIGIT+ ; NUMERIC_LITERAL : DIGIT+ ( '.' DIGIT* )? ( E [-+]? DIGIT+ )? | '.' DIGIT+ ( E [-+]? DIGIT+ )? ; GUID_LITERAL : '\'' GUID_VALUE '\'' | '{' GUID_VALUE '}' | GUID_VALUE ; MEASUREMENT_KEY_LITERAL : ACRONYM_DIGIT+ ':' DIGIT+ ; POINT_TAG_LITERAL : '"' ACRONYM_DIGIT+ '"' ; STRING_LITERAL : '\'' ( ~'\'' | '\'\'' )* '\'' ; DATETIME_LITERAL : '#' ( ~'#' )+ '#' ; SINGLE_LINE_COMMENT : '--' ~[\r\n]* -> channel(HIDDEN) ; MULTILINE_COMMENT : '/*' .*? ( '*/' | EOF ) -> channel(HIDDEN) ; SPACES : [ \u000B\t\r\n] -> channel(HIDDEN) ; UNEXPECTED_CHAR : . ; fragment DIGIT : [0-9]; fragment HEX_DIGIT : [0-9a-fA-F]; fragment ACRONYM_DIGIT : ( [a-zA-Z0-9] | '-' | '!' | '_' | '.' | '@' | '#' | '$' ); fragment GUID_VALUE : HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-'? HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-'? HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-'? HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-'? HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT ; fragment A : [aA]; fragment B : [bB]; fragment C : [cC]; fragment D : [dD]; fragment E : [eE]; fragment F : [fF]; fragment G : [gG]; fragment H : [hH]; fragment I : [iI]; fragment J : [jJ]; fragment K : [kK]; fragment L : [lL]; fragment M : [mM]; fragment N : [nN]; fragment O : [oO]; fragment P : [pP]; fragment Q : [qQ]; fragment R : [rR]; fragment S : [sS]; fragment T : [tT]; fragment U : [uU]; fragment V : [vV]; fragment W : [wW]; fragment X : [xX]; fragment Y : [yY]; fragment Z : [zZ];
oeis/095/A095836.asm
neoneye/loda-programs
11
17601
<gh_stars>10-100 ; A095836: Triangle read by rows: T(n,k) = k^((n-k)^2), n>=1, 1<=k<=n. ; Submitted by <NAME>(s4) ; 1,1,1,1,2,1,1,16,3,1,1,512,81,4,1,1,65536,19683,256,5,1,1,33554432,43046721,262144,625,6,1,1,68719476736,847288609443,4294967296,1953125,1296,7,1,1,562949953421312,150094635296999121,1125899906842624 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe add $0,1 pow $2,2 pow $0,$2
programs/oeis/017/A017439.asm
neoneye/loda
22
242884
; A017439: a(n) = (11*n + 4)^3. ; 64,3375,17576,50653,110592,205379,343000,531441,778688,1092727,1481544,1953125,2515456,3176523,3944312,4826809,5832000,6967871,8242408,9663597,11239424,12977875,14886936,16974593,19248832,21717639,24389000,27270901,30371328,33698267,37259704,41063625,45118016,49430863,54010152,58863869,64000000,69426531,75151448,81182737,87528384,94196375,101194696,108531333,116214272,124251499,132651000,141420761,150568768,160103007,170031464,180362125,191102976,202262003,213847192,225866529,238328000,251239591,264609288,278445077,292754944,307546875,322828856,338608873,354894912,371694959,389017000,406869021,425259008,444194947,463684824,483736625,504358336,525557943,547343432,569722789,592704000,616295051,640503928,665338617,690807104,716917375,743677416,771095213,799178752,827936019,857375000,887503681,918330048,949862087,982107784,1015075125,1048772096,1083206683,1118386872,1154320649,1191016000,1228480911,1266723368,1305751357 mul $0,11 add $0,4 pow $0,3
ecdsa128/gfp.asm
FloydZ/Crypto-Hash
11
28327
<filename>ecdsa128/gfp.asm .686p .mmx ;.model flat,stdcall option casemap:none option prologue:none option epilogue:none PUBLIC __mod PUBLIC __c addmod PROTO :DWORD, :DWORD, :DWORD adduintmod PROTO :DWORD, :DWORD, :DWORD compare PROTO :DWORD, :DWORD comparezero PROTO :DWORD compareone PROTO :DWORD converth2bmod PROTO :DWORD, :DWORD copy PROTO :DWORD, :DWORD div2 PROTO :DWORD div2mod PROTO :DWORD fixmod PROTO :DWORD invmod PROTO :DWORD modulo PROTO :DWORD, :DWORD mulmod PROTO :DWORD, :DWORD, :DWORD multiply PROTO :DWORD, :DWORD, :DWORD setmod PROTO :DWORD submod PROTO :DWORD, :DWORD, :DWORD zero PROTO :DWORD .data? __mod BIGINT<> __c BIGINT<> temp_a BIGINT<> temp_c BIGINT<> temp_u BIGINT<> temp_v BIGINT<> modSpace VBIGINT<> .code addmod proc ptrA:DWORD, ptrB:DWORD, ptrC:DWORD ;a+b=c mod __mod pushad mov esi, dword ptr [esp+20h+4] mov edi, dword ptr [esp+20h+8] xor ebp, ebp mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] add eax, dword ptr [edi ] adc ebx, dword ptr [edi+ 4] adc ecx, dword ptr [edi+ 8] adc edx, dword ptr [edi+12] mov esi, dword ptr [esp+20h+12] adc ebp, ebp @@: mov dword ptr [esi ], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx sub eax, dword ptr [__mod ] sbb ebx, dword ptr [__mod+ 4] sbb ecx, dword ptr [__mod+ 8] sbb edx, dword ptr [__mod+12] sbb ebp, 0 jnc @B popad ret 12 addmod endp adduintmod proc ptrA:DWORD, uintB:DWORD, ptrC:DWORD ;a+b=c mod __mod pushad mov esi, dword ptr [esp+20h+4] xor ebp, ebp mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] add eax, dword ptr [esp+20h+8] adc ebx, 0 adc ecx, 0 adc edx, 0 mov esi, dword ptr [esp+20h+12] adc ebp, ebp @@: mov dword ptr [esi ], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx sub eax, dword ptr [__mod ] sbb ebx, dword ptr [__mod+ 4] sbb ecx, dword ptr [__mod+ 8] sbb edx, dword ptr [__mod+12] sbb ebp, 0 jnc @B popad ret 12 adduintmod endp compare proc ptrA:DWORD, ptrB:DWORD ;a==b pushad mov esi, dword ptr [esp+20h+4] mov edi, dword ptr [esp+20h+8] mov ecx, 4 @@: mov eax, dword ptr [esi+4*ecx-4] cmp eax, dword ptr [edi+4*ecx-4] jnz @F dec ecx jnz @B @@: popad ret 8 compare endp compareone proc ptrA:DWORD push eax push esi mov esi, dword ptr [esp+4+8] mov eax, dword ptr [esi+12] or eax, dword ptr [esi+ 8] or eax, dword ptr [esi+ 4] test eax, eax jnz @F cmp dword ptr [esi], 1 @@: pop esi pop eax ret 4 compareone endp comparezero proc ptrA:DWORD push eax push esi mov esi, dword ptr [esp+4+8] mov eax, dword ptr [esi ] or eax, dword ptr [esi+ 4] or eax, dword ptr [esi+ 8] or eax, dword ptr [esi+12] test eax, eax pop esi pop eax ret 4 comparezero endp converth2bmod proc ptrHash:DWORD, ptrOut:DWORD pushad mov esi, dword ptr [esp+20h+4] mov edi, offset hashSpace mov ecx, 16 mov ebx, edi @@: mov eax, dword ptr [esi+ecx] bswap eax mov dword ptr [ebx], eax add ebx, 4 sub ecx, 4 jns @B and dword ptr [ebx], 0 and dword ptr [ebx+4], 0 and dword ptr [ebx+8], 0 invoke modulo, edi, dword ptr [esp+20h+8] xor eax, eax mov ecx, 8 cld rep stosd popad ret 8 converth2bmod endp copy proc ptrA:DWORD, ptrB:DWORD ;b=a pushad mov esi, dword ptr [esp+20h+4] mov edi, dword ptr [esp+20h+8] mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] mov dword ptr [edi ], eax mov dword ptr [edi+ 4], ebx mov dword ptr [edi+ 8], ecx mov dword ptr [edi+12], edx popad ret 8 copy endp div2 proc ptrA:DWORD pushad mov esi, dword ptr [esp+20h+4] mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] shr edx, 1 rcr ecx, 1 rcr ebx, 1 rcr eax, 1 mov dword ptr [esi ], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx popad ret 4 div2 endp div2mod proc ptrA:DWORD pushad mov esi, dword ptr [esp+20h+4] mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] test dword ptr [esi], 1 jz @F add eax, dword ptr [__mod ] adc ebx, dword ptr [__mod+ 4] adc ecx, dword ptr [__mod+ 8] adc edx, dword ptr [__mod+12] @@: rcr edx, 1 rcr ecx, 1 rcr ebx, 1 rcr eax, 1 mov dword ptr [esi ], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx popad ret 4 div2mod endp fixmod proc ptrA:DWORD invoke compare, dword ptr [esp+4+4], offset __mod jb @F invoke submod, dword ptr [esp+4+8], offset __mod, dword ptr [esp+4] @@: ret 4 fixmod endp invmod proc ptrInOut:DWORD pushad mov esi, dword ptr [esp+20h+4] mov eax, offset temp_u mov ebx, offset temp_v mov ecx, offset temp_a mov edx, offset temp_c invoke copy, esi, eax invoke copy, offset __mod, ebx invoke zero, ecx invoke zero, edx mov dword ptr [ecx], 1 @cmp_u_0: invoke comparezero, eax jz @exit @TESTLOWBIT_u: test dword ptr [eax], 1 jnz @TESTLOWBIT_v invoke div2, eax invoke div2mod, ecx jmp @TESTLOWBIT_u @TESTLOWBIT_v: test dword ptr [ebx], 1 jnz @COMPARE_u_v invoke div2, ebx invoke div2mod, edx jmp @TESTLOWBIT_v @COMPARE_u_v: invoke compare, eax, ebx ;u==v ja @u_gt_v jz @exit invoke submod, ebx, eax, ebx ;v=v-u invoke submod, edx, ecx, edx ;c=c-a jmp @cmp_u_0 @u_gt_v: invoke submod, eax, ebx, eax ;u=u-v @u_gtqu_v: invoke submod, ecx, edx, ecx ;a=a-c jmp @cmp_u_0 @exit: invoke copy, edx, esi invoke zero, eax invoke zero, ebx invoke zero, ecx invoke zero, edx popad ret 4 invmod endp modulo proc ptrA:DWORD, ptrC:DWORD ;c=a mod __mod ;HAC, Algorithm 14.47 pushad mov esi, dword ptr [esp+20h+4] ;ptrA mov edi, offset modSpace ;8 DD mov ebx, dword ptr [esp+20h+8] ;ptrC lea ebp, [esi+16] invoke copy, esi, ebx @@: invoke comparezero, ebp jz @F invoke multiply, ebp, offset __c, edi invoke addmod, edi, ebx, ebx ;out = r + r[i] lea ebp, [edi+16] ;ptr q[i] = edi+16 jmp @B @@: invoke compare, ebx, offset __mod jb @F invoke submod, ebx, offset __mod, ebx jmp @B @@: xor eax, eax mov ecx, 8 cld rep stosd popad ret 8 modulo endp mulmod proc ptrA:DWORD, ptrB:DWORD, ptrC:DWORD ;c=a*b mod __mod pushad mov esi, dword ptr [esp+20h+4] ;a mov ebx, dword ptr [esp+20h+8] ;b mov ebp, dword ptr [esp+20h+12] ;c mov edi, offset mulmodSpace invoke multiply, esi, ebx, edi invoke modulo, edi, ebp xor eax, eax mov ecx, 8 cld rep stosd popad ret 12 mulmod endp multiply proc ptrA:DWORD, ptrB:DWORD, ptrC:DWORD ;c=ab pushad mov esi, dword ptr [esp+20h+4] mov edi, dword ptr [esp+20h+8] mov eax, dword ptr [esi] mul dword ptr [edi] xor ecx, ecx mov dword ptr [mulSpace], eax mov ebp, edx mov eax, dword ptr [esi+4] mul dword ptr [edi] xor ebx, ebx add ebp, eax adc ecx, edx mov eax, dword ptr [esi] mul dword ptr [edi+4] add eax, ebp adc ecx, edx mov dword ptr [mulSpace+4], eax adc ebx, 0 mov eax, dword ptr [esi+8] mul dword ptr [edi] xor ebp, ebp add ecx, eax adc ebx, edx mov eax, dword ptr [esi+4] mul dword ptr [edi+4] add ecx, eax adc ebx, edx adc ebp, 0 mov eax, dword ptr [esi] mul dword ptr [edi+8] add eax, ecx adc ebx, edx mov dword ptr [mulSpace+8], eax adc ebp, 0 mov eax, dword ptr [esi+12] mul dword ptr [edi] xor ecx, ecx add ebx, eax adc ebp, edx mov eax, dword ptr [esi+8] mul dword ptr [edi+4] add ebx, eax adc ebp, edx adc ecx, 0 mov eax, dword ptr [esi+4] mul dword ptr [edi+8] add ebx, eax adc ebp, edx adc ecx, 0 mov eax, dword ptr [esi] mul dword ptr [edi+12] add eax, ebx adc ebp, edx mov dword ptr [mulSpace+12], eax adc ecx, 0 mov eax, dword ptr [esi+12] mul dword ptr [edi+4] xor ebx, ebx add ebp, eax adc ecx, edx mov eax, dword ptr [esi+8] mul dword ptr [edi+8] add ebp, eax adc ecx, edx adc ebx, 0 mov eax, dword ptr [esi+4] mul dword ptr [edi+12] add eax, ebp adc ecx, edx mov dword ptr [mulSpace+16], eax adc ebx, 0 mov eax, dword ptr [esi+12] mul dword ptr [edi+8] xor ebp, ebp add ecx, eax adc ebx, edx mov eax, dword ptr [esi+8] mul dword ptr [edi+12] add ecx, eax adc ebx, edx adc ebp, 0 mov eax, dword ptr [esi+12] mul dword ptr [edi+12] add eax, ebx adc edx, ebp ;+20=ecx, +24=eax, +28=edx mov esi, dword ptr [esp+20h+12] ;ptrOut mov edi, offset mulSpace mov dword ptr [esi+20], ecx mov dword ptr [esi+24], eax mov dword ptr [esi+28], edx mov eax, dword ptr [edi] mov ebx, dword ptr [edi+4] mov ecx, dword ptr [edi+8] mov edx, dword ptr [edi+12] mov ebp, dword ptr [edi+16] mov dword ptr [esi+ 0], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx mov dword ptr [esi+16], ebp and dword ptr [edi ], 0 and dword ptr [edi+4 ], 0 and dword ptr [edi+8 ], 0 and dword ptr [edi+12], 0 and dword ptr [edi+16], 0 popad ret 12 multiply endp setmod proc ptrM:DWORD pushad mov esi, dword ptr [esp+20h+4] mov edi, offset __mod mov eax, dword ptr [esi ] mov ebx, dword ptr [esi+ 4] mov ecx, dword ptr [esi+ 8] mov edx, dword ptr [esi+12] mov dword ptr [edi ], eax mov dword ptr [edi+ 4], ebx mov dword ptr [edi+ 8], ecx mov dword ptr [edi+12], edx mov edi, offset __c neg eax not ebx not ecx not edx ;ok, ok, whats going on ? ;) ;__c = 2^128 - __mod, where __mod is prime ;1) __mod is prime => lowest dword of __mod != 0 ;2) 0 - lowest dword of __mod always set a CF ;3) neg(x) = not(x)+1 => not(x) = neg(x)-1 ;4) 2^128 = 1*2^128 + 0*2^96 + 0*2^64 + 0*2^32 + 0 ;5) __mod = 0*2^128 + d*2^96 + c*2^64 + b*2^32 + a ;6) 2^128-__mod = 1*2^128 + 0*2^96 + 0*2^64 + 0*2^32 + 0 - 0*2^128 + d*2^96 + c*2^64 + b*2^32 + a ; ;(0-a) = neg(a) and borrow 1 (B1) ;(0-b-B1)*2^32 = (0-b-1)*2^32 = [neg(b)-1]*2^32 = not(b)*2^32 and borrow 1 ;(0-c-B1)*2^32 = (0-c-1)*2^32 = [neg(c)-1]*2^32 = not(c)*2^32 and borrow 1 ;(0-d-B1)*2^32 = (0-d-1)*2^32 = [neg(d)-1]*2^32 = not(d)*2^32 and borrow 1 ;(1-B1)*2^32 = (1-1)*2^32 = 0 mov dword ptr [edi ], eax mov dword ptr [edi+ 4], ebx mov dword ptr [edi+ 8], ecx mov dword ptr [edi+12], edx popad ret 4 setmod endp
asm/main.asm
mlndz28/selector-623
0
83307
<filename>asm/main.asm ;****************************************************************** ;* Main routine ;****************************************************************** org $2000 lds #STACK jsr HW_INIT jsr INIT loc loop_c`: jsr MODO_CONFIG tst NumVueltas beq loop_c` loop_m`: brset PTH,$C0,race` bclr PIEH,$09 brset PTH,$80,overview` bclr TIE,$20 clr Veloc clr Vueltas clr VelProm brset PTH,$40,config` idle`: jsr MODO_LIBRE bra loop_m` race`: bset PIEH,$09 bset TIE,$20 jsr MODO_COMPETENCIA bra loop_m` overview`: jsr MODO_RESUMEN bra loop_m` config`: jsr MODO_CONFIG bra loop_m`
Cubical/HITs/James/Inductive.agda
thomas-lamiaux/cubical
1
2601
{- The Inductive Version of James Construction This file contains: - An inductive family 𝕁, and its direct colimit is equivalence to James; (<NAME>, Feb. 2022) - The family 𝕁 can be iteratively constructed as pushouts; - Special cases of 𝕁 n for n = 0, 1 and 2; - Connectivity of inclusion maps. This file is the summary of the main results. The proof is divided into parts and put inside the fold Cubical.HITs.James.Inductive -} {-# OPTIONS --safe #-} module Cubical.HITs.James.Inductive where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Pointed open import Cubical.Data.Nat open import Cubical.Data.Unit open import Cubical.Data.Sigma open import Cubical.HITs.Wedge open import Cubical.HITs.Pushout open import Cubical.HITs.Pushout.PushoutProduct open import Cubical.HITs.SequentialColimit open import Cubical.HITs.James.Base open import Cubical.HITs.James.Inductive.Base open import Cubical.HITs.James.Inductive.PushoutFormula renaming (isConnectedIncl to connIncl ; isConnectedInl to connInl) open import Cubical.HITs.James.Inductive.Reduced open import Cubical.HITs.James.Inductive.ColimitEquivalence open import Cubical.Homotopy.Connected private variable ℓ : Level module JamesInd (X∙@(X , x₀) : Pointed ℓ) where -- The family 𝕁 n is equivalence to Brunerie's J n, as will be shown latter. -- Instead of his inductive procedure, 𝕁 is defined directly as an indexed HIT. 𝕁 : ℕ → Type ℓ 𝕁 = 𝕁ames (X , x₀) -- This family forms a direct system. 𝕁Seq : Sequence ℓ 𝕁Seq = 𝕁amesSeq (X , x₀) -- The inductive construction of James is called 𝕁∞. -- It is the direct colimit of 𝕁 n. 𝕁∞ : Type ℓ 𝕁∞ = Lim→ 𝕁Seq -- And of course it is equivalent to James. J≃𝕁∞ : James (X , x₀) ≃ 𝕁∞ J≃𝕁∞ = compEquiv (James≃𝕁Red∞ _) (invEquiv (𝕁ames∞≃𝕁Red∞ _)) -- Special cases of 𝕁 n for n = 0, 1 and 2: 𝕁₀≃Unit : 𝕁 0 ≃ Unit 𝕁₀≃Unit = 𝕁ames0≃ _ 𝕁₁≃X : 𝕁 1 ≃ X 𝕁₁≃X = 𝕁ames1≃ _ 𝕁₂≃P[X×X←X⋁X→X] : 𝕁 2 ≃ Pushout ⋁↪ fold⋁ 𝕁₂≃P[X×X←X⋁X→X] = 𝕁ames2≃ _ -- The following is defined as pushouts of 𝕁 n. 𝕁Push : ℕ → Type ℓ 𝕁Push = 𝕁amesPush (X , x₀) -- Brunerie uses f and g to denote the following maps, so do I. module _ {n : ℕ} where f : 𝕁Push n → X × 𝕁 (1 + n) f = leftMap _ g : 𝕁Push n → 𝕁 (1 + n) g = rightMap _ -- Here we show that 𝕁 (n+2) can be made as double pushouts invoving only X, 𝕁 n and 𝕁 (n+1). -- In particular, our 𝕁 is exactly what Brunerie had defined. 𝕁ₙ₊₂≃Pushout : (n : ℕ) → 𝕁 (2 + n) ≃ Pushout f g 𝕁ₙ₊₂≃Pushout = 𝕁ames2+n≃ _ -- Connectivity of inclusion maps: module _ (d : ℕ)(conn : isConnected (1 + d) X) where -- Warning: -- The connectivity is shifted by 2 from the convention of usual homotopy theory. -- If X is (d+1)-connected, the transition incl : 𝕁 n → 𝕁 (n+1) will be (n+1)d-connected. isConnectedIncl : (n : ℕ) → isConnectedFun ((1 + n) · d) (incl {n = n}) isConnectedIncl = connIncl X∙ d conn -- If X is (d+1)-connected, the inclusion inl : 𝕁 n → 𝕁∞ will be (n+1)d-connected. inl∞ : (n : ℕ) → 𝕁 n → 𝕁∞ inl∞ _ = inl isConnectedInl : (n : ℕ) → isConnectedFun ((1 + n) · d) (inl∞ n) isConnectedInl = connInl X∙ d conn
tools-src/gnu/gcc/gcc/ada/xnmake.adb
enfoTek/tomato.linksys.e2000.nvram-mod
80
10622
------------------------------------------------------------------------------ -- -- -- GNAT SYSTEM UTILITIES -- -- -- -- X N M A K E -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Program to construct the spec and body of the Nmake package -- Input files: -- sinfo.ads Spec of Sinfo package -- nmake.adt Template for Nmake package -- Output files: -- nmake.ads Spec of Nmake package -- nmake.adb Body of Nmake package -- Note: this program assumes that sinfo.ads has passed the error checks that -- are carried out by the csinfo utility, so it does not duplicate these -- checks and assumes that sinfo.ads has the correct form. -- In the absence of any switches, both the ads and adb files are output. -- The switch -s or /s indicates that only the ads file is to be output. -- The switch -b or /b indicates that only the adb file is to be output. -- If a file name argument is given, then the output is written to this file -- rather than to nmake.ads or nmake.adb. A file name can only be given if -- exactly one of the -s or -b options is present. with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants; with Ada.Text_IO; use Ada.Text_IO; with GNAT.Spitbol; use GNAT.Spitbol; with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns; procedure XNmake is Err : exception; -- Raised to terminate execution A : VString := Nul; Arg : VString := Nul; Arg_List : VString := Nul; Comment : VString := Nul; Default : VString := Nul; Field : VString := Nul; Line : VString := Nul; Node : VString := Nul; Op_Name : VString := Nul; Prevl : VString := Nul; Sinfo_Rev : VString := Nul; Synonym : VString := Nul; Temp_Rev : VString := Nul; X : VString := Nul; XNmake_Rev : VString := Nul; Lineno : Natural; NWidth : Natural; FileS : VString := V ("nmake.ads"); FileB : VString := V ("nmake.adb"); -- Set to null if corresponding file not to be generated Given_File : VString := Nul; -- File name given by command line argument InS, InT : File_Type; OutS, OutB : File_Type; wsp : Pattern := Span (' ' & ASCII.HT); -- Note: in following patterns, we break up the word revision to -- avoid RCS getting enthusiastic about updating the reference! Get_SRev : Pattern := BreakX ('$') & "$Rev" & "ision: " & Break (' ') * Sinfo_Rev; GetT_Rev : Pattern := BreakX ('$') & "$Rev" & "ision: " & Break (' ') * Temp_Rev; Body_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- body only"; Spec_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- spec only"; Node_Hdr : Pattern := wsp & "-- N_" & Rest * Node; Punc : Pattern := BreakX (" .,"); Binop : Pattern := wsp & "-- plus fields for binary operator"; Unop : Pattern := wsp & "-- plus fields for unary operator"; Syn : Pattern := wsp & "-- " & Break (' ') * Synonym & " (" & Break (')') * Field & Rest * Comment; Templ : Pattern := BreakX ('T') * A & "T e m p l a t e"; Spec : Pattern := BreakX ('S') * A & "S p e c"; Sem_Field : Pattern := BreakX ('-') & "-Sem"; Lib_Field : Pattern := BreakX ('-') & "-Lib"; Get_Field : Pattern := BreakX (Decimal_Digit_Set) * Field; Get_Dflt : Pattern := BreakX ('(') & "(set to " & Break (" ") * Default & " if"; Next_Arg : Pattern := Break (',') * Arg & ','; Op_Node : Pattern := "Op_" & Rest * Op_Name; Shft_Rot : Pattern := "Shift_" or "Rotate_"; No_Ent : Pattern := "Or_Else" or "And_Then" or "In" or "Not_In"; M : Match_Result; V_String_Id : constant VString := V ("String_Id"); V_Node_Id : constant VString := V ("Node_Id"); V_Name_Id : constant VString := V ("Name_Id"); V_List_Id : constant VString := V ("List_Id"); V_Elist_Id : constant VString := V ("Elist_Id"); V_Boolean : constant VString := V ("Boolean"); procedure WriteS (S : String); procedure WriteB (S : String); procedure WriteBS (S : String); procedure WriteS (S : VString); procedure WriteB (S : VString); procedure WriteBS (S : VString); -- Write given line to spec or body file or both if active procedure WriteB (S : String) is begin if FileB /= Nul then Put_Line (OutB, S); end if; end WriteB; procedure WriteB (S : VString) is begin if FileB /= Nul then Put_Line (OutB, S); end if; end WriteB; procedure WriteBS (S : String) is begin if FileB /= Nul then Put_Line (OutB, S); end if; if FileS /= Nul then Put_Line (OutS, S); end if; end WriteBS; procedure WriteBS (S : VString) is begin if FileB /= Nul then Put_Line (OutB, S); end if; if FileS /= Nul then Put_Line (OutS, S); end if; end WriteBS; procedure WriteS (S : String) is begin if FileS /= Nul then Put_Line (OutS, S); end if; end WriteS; procedure WriteS (S : VString) is begin if FileS /= Nul then Put_Line (OutS, S); end if; end WriteS; -- Start of processing for XNmake begin -- Capture our revision (following line updated by RCS) Match ("$Revision$", "$Rev" & "ision: " & Break (' ') * XNmake_Rev); Lineno := 0; NWidth := 28; Anchored_Mode := True; for ArgN in 1 .. Argument_Count loop declare Arg : constant String := Argument (ArgN); begin if Arg (1) = '-' then if Arg'Length = 2 and then (Arg (2) = 'b' or else Arg (2) = 'B') then FileS := Nul; elsif Arg'Length = 2 and then (Arg (2) = 's' or else Arg (2) = 'S') then FileB := Nul; else raise Err; end if; else if Given_File /= Nul then raise Err; else Given_File := V (Arg); end if; end if; end; end loop; if FileS = Nul and then FileB = Nul then raise Err; elsif Given_File /= Nul then if FileB = Nul then FileS := Given_File; elsif FileS = Nul then FileB := Given_File; else raise Err; end if; end if; Open (InS, In_File, "sinfo.ads"); Open (InT, In_File, "nmake.adt"); if FileS /= Nul then Create (OutS, Out_File, S (FileS)); end if; if FileB /= Nul then Create (OutB, Out_File, S (FileB)); end if; Anchored_Mode := True; -- Get Sinfo revision number loop Line := Get_Line (InS); exit when Match (Line, Get_SRev); end loop; -- Copy initial part of template to spec and body loop Line := Get_Line (InT); if Match (Line, GetT_Rev) then WriteBS ("-- Generated by xnmake revision " & XNmake_Rev & " using"); WriteBS ("-- sinfo.ads revision " & Sinfo_Rev); WriteBS ("-- nmake.adt revision " & Temp_Rev); else -- Skip lines describing the template if Match (Line, "-- This file is a template") then loop Line := Get_Line (InT); exit when Line = ""; end loop; end if; exit when Match (Line, "package"); if Match (Line, Body_Only, M) then Replace (M, X); WriteB (Line); elsif Match (Line, Spec_Only, M) then Replace (M, X); WriteS (Line); else if Match (Line, Templ, M) then Replace (M, A & " S p e c "); end if; WriteS (Line); if Match (Line, Spec, M) then Replace (M, A & "B o d y"); end if; WriteB (Line); end if; end if; end loop; -- Package line reached WriteS ("package Nmake is"); WriteB ("package body Nmake is"); WriteB (""); -- Copy rest of lines up to template insert point to spec only loop Line := Get_Line (InT); exit when Match (Line, "!!TEMPLATE INSERTION POINT"); WriteS (Line); end loop; -- Here we are doing the actual insertions, loop through node types loop Line := Get_Line (InS); if Match (Line, Node_Hdr) and then not Match (Node, Punc) and then Node /= "Unused" then exit when Node = "Empty"; Prevl := " function Make_" & Node & " (Sloc : Source_Ptr"; Arg_List := Nul; -- Loop through fields of one node loop Line := Get_Line (InS); exit when Line = ""; if Match (Line, Binop) then WriteBS (Prevl & ';'); Append (Arg_List, "Left_Opnd,Right_Opnd,"); WriteBS ( " " & Rpad ("Left_Opnd", NWidth) & " : Node_Id;"); Prevl := " " & Rpad ("Right_Opnd", NWidth) & " : Node_Id"; elsif Match (Line, Unop) then WriteBS (Prevl & ';'); Append (Arg_List, "Right_Opnd,"); Prevl := " " & Rpad ("Right_Opnd", NWidth) & " : Node_Id"; elsif Match (Line, Syn) then if Synonym /= "Prev_Ids" and then Synonym /= "More_Ids" and then Synonym /= "Comes_From_Source" and then Synonym /= "Paren_Count" and then not Match (Field, Sem_Field) and then not Match (Field, Lib_Field) then Match (Field, Get_Field); if Field = "Str" then Field := V_String_Id; elsif Field = "Node" then Field := V_Node_Id; elsif Field = "Name" then Field := V_Name_Id; elsif Field = "List" then Field := V_List_Id; elsif Field = "Elist" then Field := V_Elist_Id; elsif Field = "Flag" then Field := V_Boolean; end if; if Field = "Boolean" then Default := V ("False"); else Default := Nul; end if; Match (Comment, Get_Dflt); WriteBS (Prevl & ';'); Append (Arg_List, Synonym & ','); Rpad (Synonym, NWidth); if Default = "" then Prevl := " " & Synonym & " : " & Field; else Prevl := " " & Synonym & " : " & Field & " := " & Default; end if; end if; end if; end loop; WriteBS (Prevl & ')'); WriteS (" return Node_Id;"); WriteS (" pragma Inline (Make_" & Node & ");"); WriteB (" return Node_Id"); WriteB (" is"); WriteB (" N : constant Node_Id :="); if Match (Node, "Defining_Identifier") or else Match (Node, "Defining_Character") or else Match (Node, "Defining_Operator") then WriteB (" New_Entity (N_" & Node & ", Sloc);"); else WriteB (" New_Node (N_" & Node & ", Sloc);"); end if; WriteB (" begin"); while Match (Arg_List, Next_Arg, "") loop if Length (Arg) < NWidth then WriteB (" Set_" & Arg & " (N, " & Arg & ");"); else WriteB (" Set_" & Arg); WriteB (" (N, " & Arg & ");"); end if; end loop; if Match (Node, Op_Node) then if Node = "Op_Plus" then WriteB (" Set_Chars (N, Name_Op_Add);"); elsif Node = "Op_Minus" then WriteB (" Set_Chars (N, Name_Op_Subtract);"); elsif Match (Op_Name, Shft_Rot) then WriteB (" Set_Chars (N, Name_" & Op_Name & ");"); else WriteB (" Set_Chars (N, Name_" & Node & ");"); end if; if not Match (Op_Name, No_Ent) then WriteB (" Set_Entity (N, Standard_" & Node & ");"); end if; end if; WriteB (" return N;"); WriteB (" end Make_" & Node & ';'); WriteBS (""); end if; end loop; WriteBS ("end Nmake;"); exception when Err => Put_Line (Standard_Error, "usage: xnmake [-b] [-s] [filename]"); Set_Exit_Status (1); end XNmake;
test/Succeed/Issue2752.agda
shlevy/agda
2
4427
<filename>test/Succeed/Issue2752.agda -- Andreas, 2017-10-04, issue #2752, report and test case by nad -- -- Problem was: instance does not distribute into mutual blocks. open import Agda.Builtin.List open import Agda.Builtin.Size mutual data Rose (i : Size) (A : Set) : Set where node : List (Rose′ i A) → Rose i A data Rose′ (i : Size) (A : Set) : Set where delay : {j : Size< i} → Rose j A → Rose′ i A record Map (F : Set → Set) : Set₁ where field map : {A B : Set} → (A → B) → F A → F B open Map ⦃ … ⦄ public instance Map-List : Map List Map.map Map-List = λ where f [] → [] f (x ∷ xs) → f x ∷ map f xs instance mutual Map-Rose : ∀ {i} → Map (Rose i) Map.map Map-Rose f (node xs) = node (map (map f) xs) Map-Rose′ : ∀ {i} → Map (Rose′ i) Map.map Map-Rose′ f (delay t) = delay (map f t) -- Was: unresolved instance arguments. -- Should succeed.
bin/JWASM/Samples/Linux3.asm
Abd-Beltaji/ASMEMU
3
16140
<filename>bin/JWASM/Samples/Linux3.asm<gh_stars>1-10 ; rudimentary "hello world" for Xwindows ; translated from a nasm sample supplied by <NAME>. ; LD is used as linker, since WLINK doesn't know how to use shared objects. ; ; 1. assemble: jwasm -elf -Fo=Linux3.o Linux3.asm ; 2. link with LD: ld -s -o Linux3 Linux3.o -I/lib/ld-linux.so.2 -L/usr/X11R6/lib -lX11 .386 .model flat public _start ;--- The X functions don't have a underscore prefix. ;--- Therefore SYSCALL is used in the prototypes. ;--- If C is to be used instead, the -zcw cmdline parameter is needed. XOpenDisplay proto syscall :DWORD XDefaultRootWindow proto syscall :DWORD XCreateSimpleWindow proto syscall :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD XSelectInput proto syscall :DWORD, :DWORD, :DWORD XStoreName proto syscall :DWORD, :DWORD, :DWORD XMapRaised proto syscall :DWORD, :DWORD XCreateGC proto syscall :DWORD, :DWORD, :DWORD, :DWORD XSetForeground proto syscall :DWORD, :DWORD, :DWORD XSetBackground proto syscall :DWORD, :DWORD, :DWORD XNextEvent proto syscall :DWORD, :DWORD XFreeGC proto syscall :DWORD, :DWORD XDestroyWindow proto syscall :DWORD, :DWORD XCloseDisplay proto syscall :DWORD XDrawImageString proto syscall :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD KeyPressMask equ 1 ; mask for XSelectInput KeyPress equ 2 ; the "type" of event (offset 0 in "glob of bytes") ExposeMask equ 1 shl 15 ExposeEvent equ 12 event_size equ 20h ; ??? max size of several different structs ;------------------------------------------ .data StringOpenFailed db "Can't Open X display!", 10 caption db 'A Window', 0 string db ' Greetings from X, Earthling! ' ;----------------------------------------- .data? Display dd ? Window dd ? GC dd ? event dd event_size dup (?) ;------------------------------------- .code _start: ; let the ritual begin. ; open a connection to the server. ; param 0 uses the "DISPLAY" environment variable ; or defaults to local machine. invoke XOpenDisplay, 0 .if (eax == 0) mov eax, 4 ; __NR_write mov ebx, 2 ; stderr mov ecx, offset StringOpenFailed; buffer mov edx, sizeof StringOpenFailed; count int 80h jmp Terminate .endif mov [Display], eax invoke XDefaultRootWindow, [Display] ; error? ;--- params: display handle, defaultrootwindow, left, top, width, height ;--- border width, border colour, background colour invoke XCreateSimpleWindow, [Display], eax, 50, 50, 400, 300, 0, 0, 0 .if (eax == 0) invoke XCloseDisplay, [Display] jmp Terminate .endif mov [Window], eax ; this is one Windows doesn't do. if we don't specify ; what events (messages) we want to receive, we don't get any. ; "or" this with other events to recv! ; don't forget to handle 'em! invoke XSelectInput, [Display], [Window], KeyPressMask or ExposeMask ; error? ; give the baby a name invoke XStoreName, [Display], [Window], offset caption ; error? invoke XMapRaised, [Display], [Window] ; make our window visible. ; error? invoke XCreateGC, [Display], [Window], 0, 0 ; error? mov [GC], eax ; Mmmm, looks like 16-bit color, 5-6-5, on my machine. ; Bet we can't count on it! ; 1111100000000000b = red invoke XSetForeground, [Display], [GC], 1111100000000000b ; error? ; 0000011111100000b = green invoke XSetBackground, [Display], [GC], 0000011111100000b ; error? .while (1) invoke XNextEvent, [Display], offset event ; error? .if (dword ptr [event+0] == ExposeEvent) invoke XDrawImageString, [Display], [Window], [GC], 155, 140, offset string, sizeof string .elseif (dword ptr [event+0] == KeyPress) .break ; exit gracefully if key pressed .endif .endw invoke XFreeGC, [Display], [GC] invoke XDestroyWindow, [Display], [Window] invoke XCloseDisplay, [Display] Terminate: mov eax, 1 ; function (sys_exit) xor ebx, ebx ; exit code int 80h ; make Linux system call end _start
Numeral/Matrix.agda
Lolirofle/stuff-in-agda
6
5814
module Numeral.Matrix where import Lvl open import Syntax.Number open import Data open import Data.Boolean open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional using (const) open import Numeral.Finite open import Numeral.Finite.Bound open import Numeral.Finite.Oper open import Numeral.Finite.Oper.Comparisons open import Numeral.Natural open import Numeral.CoordinateVector as Vector using (Vector) open import Type -- Accessor of data in 2-dimensional finite space (Implies bounded). -- Like a data table. record Matrix {ℓ} (s : ℕ ⨯ ℕ) (T : Type{ℓ}) : Type{ℓ} where constructor mat -- Type of elements in the matrix. Element : Type Element = T -- Width of the matrix (Number of columns). width : ℕ width = Tuple.left(s) -- Height of the matrix (Number of rows). height : ℕ height = Tuple.right(s) field -- Projection of a matrix. -- A cell in the matrix. proj : (𝕟(width) ⨯ 𝕟(height)) → T -- Vector of a row in the matrix. row : 𝕟(height) → Vector(width)(T) (row(y))(x) = proj(x , y) -- Vector of a column in the matrix. col : 𝕟(width) → Vector(height)(T) (col(x))(y) = proj(x , y) -- Transpose (Reflection on main diagonal). ⬔_ : Matrix(height , width)(T) proj(⬔_)(x , y) = proj(y , x) module Rows where module _ {ℓ} {w}{h} {T : Type{ℓ}} where -- A matrix with two rows swapped. swap : 𝕟(h) → 𝕟(h) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(swap(y₁)(y₂)(M))(x , y) = if (y ≡? y₁) then Matrix.proj(M)(x , y₂) else if (y ≡? y₂) then Matrix.proj(M)(x , y₁) else Matrix.proj(M)(x , y) module _ {ℓ₁ ℓ₂} {w₁ w₂}{h} {A : Type{ℓ₁}} {B : Type{ℓ₂}} where -- A matrix where a function has been applied to every row. map : (Vector(w₁)(A) → Vector(w₂)(B)) → Matrix(w₁ , h)(A) → Matrix(w₂ , h)(B) Matrix.proj(map f(M))(x , y) = Vector.proj(f(Matrix.row(M)(y)))(x) module _ {ℓ} {w}{h} {T : Type{ℓ}} where -- A matrix where a function has been applied to every element of the specified row. mapSingle : 𝕟(h) → (T → T) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(mapSingle target f(M))(x , y) = if (y ≡? target) then f(Matrix.proj(M)(x , y)) else Matrix.proj(M)(x , y) -- A matrix where a function has been applied to the specified row. applyOn : 𝕟(h) → (Vector(w)(T) → Vector(w)(T)) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(applyOn target f(M))(x , y) = if (y ≡? target) then Vector.proj(f(Matrix.row(M)(y)))(x) else Matrix.proj(M)(x , y) module Cols where module _ {ℓ} {w}{h} {T : Type{ℓ}} where -- A matrix with two columns swapped. swap : 𝕟(w) → 𝕟(w) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(swap(x₁)(x₂)(M))(x , y) = if (x ≡? x₁) then Matrix.proj(M)(x₂ , y) else if (x ≡? x₂) then Matrix.proj(M)(x₁ , y) else Matrix.proj(M)(x , y) module _ {ℓ₁ ℓ₂} {w}{h₁ h₂} {A : Type{ℓ₁}} {B : Type{ℓ₂}} where -- A matrix where a function has been applied to every column. map : (Vector(h₁)(A) → Vector(h₂)(B)) → Matrix(w , h₁)(A) → Matrix(w , h₂)(B) Matrix.proj(map f(M))(x , y) = Vector.proj(f(Matrix.col(M)(x)))(y) module _ {ℓ} {w}{h} {T : Type{ℓ}} where -- A matrix where a function has been applied to every element of the specified column. mapSingle : 𝕟(w) → (T → T) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(mapSingle target f(M))(x , y) = if (y ≡? target) then f(Matrix.proj(M)(x , y)) else Matrix.proj(M)(x , y) -- A matrix where a function has been applied to the specified column. applyOn : 𝕟(w) → (Vector(h)(T) → Vector(h)(T)) → Matrix(w , h)(T) → Matrix(w , h)(T) Matrix.proj(applyOn target f(M))(x , y) = if (x ≡? target) then Vector.proj(f(Matrix.col(M)(x)))(y) else Matrix.proj(M)(x , y) module _ {ℓ₁ ℓ₂} {s} {A : Type{ℓ₁}} {B : Type{ℓ₂}} where -- A matrix where a function has been applied to every element. map : (A → B) → Matrix(s)(A) → Matrix(s)(B) -- TODO: Same implementation in Vector.agda. Generalize. Maybe like in Haskell? With Applicative, Functor and stuff? Matrix.proj(map f(m))(x , y) = f(Matrix.proj(m)(x , y)) module _ {ℓ₁ ℓ₂ ℓ₃} {s} {A : Type{ℓ₁}} {B : Type{ℓ₂}} {C : Type{ℓ₃}} where -- A matrix where a binary operator has been pairwise applied to every element of the given matrices at the same positions. -- This can be used to construct a component-wise operator. map₂ : (A → B → C) → Matrix(s)(A) → Matrix(s)(B) → Matrix(s)(C) Matrix.proj(map₂(_▫_) (v₁)(v₂))(x , y) = Matrix.proj(v₁)(x , y) ▫ Matrix.proj(v₂)(x , y) module _ {ℓ} {w}{h} {T : Type{ℓ}} where -- A matrix from a vector of vectors. The inner vectors becomes rows. rowMat : Vector(h)(Vector(w)(T)) → Matrix(w , h)(T) Matrix.proj(rowMat(vs))(x , y) = Vector.proj(Vector.proj(vs)(y))(x) -- A matrix from a vector of vectors. The inner vectors becomes columns. colMat : Vector(w)(Vector(h)(T)) → Matrix(w , h)(T) Matrix.proj(colMat(vs))(x , y) = Vector.proj(Vector.proj(vs)(x))(y) -- A matrix represented as a vector of vectors where the inner vectors are the rows of the matrix. rows : Matrix(w , h)(T) → Vector(h)(Vector(w)(T)) ((rows(M))(y))(x) = Matrix.proj(M)(x , y) -- A matrix represented as a vector of vectors where the inner vectors are the columns of the matrix. cols : Matrix(w , h)(T) → Vector(w)(Vector(h)(T)) ((cols(M))(x))(y) = Matrix.proj(M)(x , y) -- Matrix with one row and one column removed. minor : Matrix(𝐒(w) , 𝐒(h))(T) → (𝕟(𝐒(w)) ⨯ 𝕟(𝐒(h))) → Matrix(w , h)(T) Matrix.proj(minor(M)(X , Y))(x , y) = Matrix.proj(M)(new-x , new-y) where new-x = if(x <? X) then bound-𝐒(x) else 𝐒(x) new-y = if(y <? Y) then bound-𝐒(y) else 𝐒(y) module _ {ℓ} {s} {T : Type{ℓ}} where -- A matrix filled with a single element. fill : T → Matrix(s)(T) Matrix.proj(fill(elem)) = const(elem) -- submatrix : Matrix(w , h)(T) → ((X , Y) : (𝕟(w) ⨯ 𝕟(h))) → ((W , H) : (𝕟(w −₀ X) ⨯ 𝕟(h −₀ Y))) → Matrix(W −₀ X , H −₀ Y)(T) -- A square matrix is a matrix with equal length in both directions. SquareMatrix : ∀{ℓ} → ℕ → Type{ℓ} → Type{ℓ} SquareMatrix(d)(T) = Matrix(d , d)(T) module SquareMatrix {ℓ} {d} {T : Type{ℓ}} where module _ (m : SquareMatrix(d)(T)) where -- The diagonal vector. -- The vector consisting of the elements in the main diagonal of the matrix. diag : Vector(d)(T) (diag)(i) = Matrix.proj(m)(i , i) -- The maximum number of dimensions of a space that the matrix can describe linear transformations in. -- The width/height of the matrix. dim : ℕ dim = d -- The diagonal matrix from a vector. -- The matrix consisting of the elements from the vector in the main diagonal and a default element (zero) in the rest of the positions. diagMat : T → Vector(d)(T) → SquareMatrix(d)(T) Matrix.proj(diagMat(zero)(v))(x , y) = if (x ≡? y) then Vector.proj(v)(x) else zero -- Scalar matrix. -- The matrix consisting of a constant element in the main diagonal and a default element (zero) in the rest of the positions. scalarMat : T → T → SquareMatrix(d)(T) scalarMat(zero)(elem) = diagMat(zero)(Vector.fill(elem)) module _ {ℓ} where RowVector : ℕ → Type{ℓ} → Type{ℓ} RowVector(d)(T) = Matrix(d , 1)(T) module RowVector {d}{T} where rowVecMat : Vector(d)(T) → RowVector(d)(T) Matrix.proj(rowVecMat(v))(x , _) = Vector.proj(v)(x) ColVector : ℕ → Type{ℓ} → Type{ℓ} ColVector(d)(T) = Matrix(1 , d)(T) module ColVector {d}{T} where colVecMat : Vector(d)(T) → ColVector(d)(T) Matrix.proj(colVecMat(v))(_ , y) = Vector.proj(v)(y) module _ {ℓ₁ ℓ₂ ℓ₃ ℓ₄} {A : Type{ℓ₁}} {B : Type{ℓ₂}} {C : Type{ℓ₃}} {D : Type{ℓ₄}} where multPattern : ∀{x y z} → (C → D → D) → (A → B → C) → D → Matrix(y , z)(A) → Matrix(x , y)(B) → Matrix(x , z)(D) Matrix.proj(multPattern (_+_) (_⋅_) (zero) M₁ M₂)(x , y) = Vector.foldᵣ(_+_) zero (Vector.map₂(_⋅_) (Matrix.row(M₁)(y)) (Matrix.col(M₂)(x))) {- module _ {ℓ} {T : Type{ℓ}} where detPatternX : T → ∀{d} → SquareMatrix(d)(T) → 𝕟(d) → T detPatternX _ {𝐒(𝟎)} M _ = Matrix.proj M(0 , 0) detPatternX zero {𝐒(𝐒(d))} M y = Vector.foldᵣ {!+_!} zero (Vector.map () (Matrix.row M(y))) -}
generate_key.adb
doug16rogers/solitaire
1
22929
<filename>generate_key.adb with Solitaire_Operations.Text_Representation; with Ada.Text_IO; use Ada; procedure Generate_Key is Deck : Solitaire_Operations.Deck_List := Solitaire_Operations.Standard_Deck; begin -- Generate_Key Solitaire_Operations.Shuffle (Deck => Deck); Output : for I in Deck'range loop Text_IO.Put (Item => Solitaire_Operations.Text_Representation.Short_Card_Name (Deck (I) ) ); end loop Output; Text_IO.New_Line; end Generate_Key;