.file "arc4random.c" /APP .pushsection .ident .asciz "$NetBSD: arc4random.c,v 1.21 2013/10/17 23:56:17 christos Exp $" .popsection .weak arc4random arc4random = _arc4random .weak arc4random_addrandom arc4random_addrandom = _arc4random_addrandom .weak arc4random_buf arc4random_buf = _arc4random_buf .weak arc4random_stir arc4random_stir = _arc4random_stir .weak arc4random_uniform arc4random_uniform = _arc4random_uniform /NO_APP .text .type arc4_stir.constprop.1, @function arc4_stir.constprop.1: .LFB45: .cfi_startproc pushq %r13 .cfi_def_cfa_offset 16 .cfi_offset 13, -16 pushq %r12 .cfi_def_cfa_offset 24 .cfi_offset 12, -24 pushq %rbp .cfi_def_cfa_offset 32 .cfi_offset 6, -32 pushq %rbx .cfi_def_cfa_offset 40 .cfi_offset 3, -40 subq $152, %rsp .cfi_def_cfa_offset 192 movl $1, (%rsp) movl $61, 4(%rsp) leaq 16(%rsp), %rbx leaq 144(%rsp), %r13 leaq 8(%rsp), %r12 movq %rsp, %rbp .L4: movq $4, 8(%rsp) xorl %r9d, %r9d xorl %r8d, %r8d movq %r12, %rcx movq %rbx, %rdx movl $2, %esi movq %rbp, %rdi call _sysctl@PLT cmpl $-1, %eax je .L11 addq $4, %rbx cmpq %r13, %rbx jne .L4 movzbl 2+rs(%rip), %r10d movzbl 3+rs(%rip), %ecx leal 1(%r10), %esi xorl %edx, %edx leaq rs(%rip), %rax .L6: movzbl %sil, %r9d movzbl 4(%rax,%r9), %r8d movq %rdx, %rdi andl $127, %edi movl %r8d, %ebx addb 16(%rsp,%rdi), %bl addb %bl, %cl movzbl %cl, %edi movzbl 4(%rax,%rdi), %r11d movb %r11b, 4(%rax,%r9) movb %r8b, 4(%rax,%rdi) addq $1, %rdx addb $1, %sil cmpq $256, %rdx jne .L6 movb %r10b, 2+rs(%rip) movb %cl, 3+rs(%rip) movl $1, %edx .L8: leal (%r10,%rdx), %r8d movzbl %r8b, %r8d movzbl 4(%rax,%r8), %edi addb %dil, %cl movzbl %cl, %esi movzbl 4(%rax,%rsi), %r9d movb %r9b, 4(%rax,%r8) movb %dil, 4(%rax,%rsi) addq $1, %rdx cmpq $1025, %rdx jne .L8 movb %r10b, 2+rs(%rip) movb %cl, 3+rs(%rip) movb $1, rs(%rip) addq $152, %rsp .cfi_remember_state .cfi_def_cfa_offset 40 popq %rbx .cfi_def_cfa_offset 32 popq %rbp .cfi_def_cfa_offset 24 popq %r12 .cfi_def_cfa_offset 16 popq %r13 .cfi_def_cfa_offset 8 ret .L11: .cfi_restore_state call abort@PLT .cfi_endproc .LFE45: .size arc4_stir.constprop.1, .-arc4_stir.constprop.1 .globl _arc4random_stir .type _arc4random_stir, @function _arc4random_stir: .LFB40: .cfi_startproc movq __isthreaded@GOTPCREL(%rip), %rax movl (%rax), %eax testl %eax, %eax jne .L15 jmp arc4_stir.constprop.1 .L15: subq $8, %rsp .cfi_def_cfa_offset 16 leaq 264+rs(%rip), %rdi call __libc_mutex_lock@PLT call arc4_stir.constprop.1 leaq 264+rs(%rip), %rdi addq $8, %rsp .cfi_def_cfa_offset 8 jmp __libc_mutex_unlock@PLT .cfi_endproc .LFE40: .size _arc4random_stir, .-_arc4random_stir .globl _arc4random_addrandom .type _arc4random_addrandom, @function _arc4random_addrandom: .LFB41: .cfi_startproc pushq %r12 .cfi_def_cfa_offset 16 .cfi_offset 12, -16 pushq %rbp .cfi_def_cfa_offset 24 .cfi_offset 6, -24 pushq %rbx .cfi_def_cfa_offset 32 .cfi_offset 3, -32 subq $16, %rsp .cfi_def_cfa_offset 48 movq %rdi, %rbp movq __isthreaded@GOTPCREL(%rip), %rax movl (%rax), %r12d testl %r12d, %r12d jne .L26 .L17: cmpb $0, rs(%rip) je .L27 .L18: movzbl 3+rs(%rip), %ebx movslq %esi, %r11 movzbl 2+rs(%rip), %eax leal 1(%rax), %r8d xorl %ecx, %ecx leaq rs(%rip), %rsi jmp .L20 .L28: movl %eax, %ebx .L20: movb %r8b, 2+rs(%rip) movzbl %r8b, %r10d movzbl 4(%rsi,%r10), %r9d movq %rcx, %rax xorl %edx, %edx divq %r11 movl %r9d, %eax addb 0(%rbp,%rdx), %al addb %bl, %al movb %al, 3+rs(%rip) movzbl %al, %edx movzbl 4(%rsi,%rdx), %edi movb %dil, 4(%rsi,%r10) movb %r9b, 4(%rsi,%rdx) addq $1, %rcx addb $1, %r8b cmpq $256, %rcx jne .L28 testl %r12d, %r12d jne .L29 addq $16, %rsp .cfi_remember_state .cfi_def_cfa_offset 32 popq %rbx .cfi_def_cfa_offset 24 popq %rbp .cfi_def_cfa_offset 16 popq %r12 .cfi_def_cfa_offset 8 ret .L29: .cfi_restore_state leaq 264+rs(%rip), %rdi addq $16, %rsp .cfi_remember_state .cfi_def_cfa_offset 32 popq %rbx .cfi_def_cfa_offset 24 popq %rbp .cfi_def_cfa_offset 16 popq %r12 .cfi_def_cfa_offset 8 jmp __libc_mutex_unlock@PLT .L26: .cfi_restore_state movl %esi, 12(%rsp) leaq 264+rs(%rip), %rdi call __libc_mutex_lock@PLT movl 12(%rsp), %esi jmp .L17 .L27: movl %esi, 12(%rsp) call arc4_stir.constprop.1 movl 12(%rsp), %esi jmp .L18 .cfi_endproc .LFE41: .size _arc4random_addrandom, .-_arc4random_addrandom .globl _arc4random .type _arc4random, @function _arc4random: .LFB42: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 pushq %rbx .cfi_def_cfa_offset 24 .cfi_offset 3, -24 subq $8, %rsp .cfi_def_cfa_offset 32 movq __isthreaded@GOTPCREL(%rip), %rax movl (%rax), %ebp testl %ebp, %ebp jne .L41 .L31: cmpb $0, rs(%rip) je .L42 .L32: leaq rs(%rip), %rdx movzbl 2+rs(%rip), %eax leal 1(%rax), %r8d movzbl %r8b, %r8d movzbl 4(%rdx,%r8), %ecx movl %ecx, %r9d addb 3+rs(%rip), %r9b movzbl %r9b, %edi movzbl 4(%rdx,%rdi), %esi movb %sil, 4(%rdx,%r8) movb %cl, 4(%rdx,%rdi) addb %sil, %cl movzbl %cl, %ecx movzbl 4(%rdx,%rcx), %esi sall $24, %esi leal 2(%rax), %r10d movzbl %r10b, %r10d movzbl 4(%rdx,%r10), %ecx addb %cl, %r9b movzbl %r9b, %r8d movzbl 4(%rdx,%r8), %edi movb %dil, 4(%rdx,%r10) movb %cl, 4(%rdx,%r8) addb %dil, %cl movzbl %cl, %ecx movzbl 4(%rdx,%rcx), %ebx sall $16, %ebx leal 3(%rax), %r10d movzbl %r10b, %r10d movzbl 4(%rdx,%r10), %ecx addb %cl, %r9b movzbl %r9b, %r8d movzbl 4(%rdx,%r8), %edi movb %dil, 4(%rdx,%r10) movb %cl, 4(%rdx,%r8) addb %dil, %cl movzbl %cl, %ecx movzbl 4(%rdx,%rcx), %ecx sall $8, %ecx addb $4, %al movb %al, 2+rs(%rip) movzbl %al, %eax movzbl 4(%rdx,%rax), %edi addb %dil, %r9b movb %r9b, 3+rs(%rip) movzbl %r9b, %r9d movzbl 4(%rdx,%r9), %r8d movb %r8b, 4(%rdx,%rax) movb %dil, 4(%rdx,%r9) addb %r8b, %dil movzbl %dil, %edi movzbl 4(%rdx,%rdi), %eax orl %eax, %ebx orl %esi, %ebx orl %ecx, %ebx testl %ebp, %ebp je .L33 leaq 264+rs(%rip), %rdi call __libc_mutex_unlock@PLT .L33: movl %ebx, %eax addq $8, %rsp .cfi_remember_state .cfi_def_cfa_offset 24 popq %rbx .cfi_def_cfa_offset 16 popq %rbp .cfi_def_cfa_offset 8 ret .L41: .cfi_restore_state leaq 264+rs(%rip), %rdi call __libc_mutex_lock@PLT jmp .L31 .L42: call arc4_stir.constprop.1 .p2align 4,,8 jmp .L32 .cfi_endproc .LFE42: .size _arc4random, .-_arc4random .globl _arc4random_buf .type _arc4random_buf, @function _arc4random_buf: .LFB43: .cfi_startproc pushq %r12 .cfi_def_cfa_offset 16 .cfi_offset 12, -16 pushq %rbp .cfi_def_cfa_offset 24 .cfi_offset 6, -24 pushq %rbx .cfi_def_cfa_offset 32 .cfi_offset 3, -32 movq %rdi, %rbp leaq (%rdi,%rsi), %rbx movq __isthreaded@GOTPCREL(%rip), %rax movl (%rax), %r12d testl %r12d, %r12d jne .L54 .L44: cmpb $0, rs(%rip) je .L55 .L45: movzbl 2+rs(%rip), %edi movzbl 3+rs(%rip), %r8d cmpq %rbx, %rbp jae .L46 movl %edi, %r9d movq %rbp, %rdx leaq rs(%rip), %rax .L48: addq $1, %rdx addb $1, %r9b movzbl %r9b, %esi movzbl 4(%rax,%rsi), %ecx addb %cl, %r8b movzbl %r8b, %r11d movzbl 4(%rax,%r11), %r10d movb %r10b, 4(%rax,%rsi) movb %cl, 4(%rax,%r11) addb %r10b, %cl movzbl %cl, %ecx movzbl 4(%rax,%rcx), %ecx movb %cl, -1(%rdx) cmpq %rbx, %rdx jne .L48 subb %bpl, %dil addb %dl, %dil .L46: movb %dil, 2+rs(%rip) movb %r8b, 3+rs(%rip) testl %r12d, %r12d jne .L56 popq %rbx .cfi_remember_state .cfi_def_cfa_offset 24 popq %rbp .cfi_def_cfa_offset 16 popq %r12 .cfi_def_cfa_offset 8 ret .L56: .cfi_restore_state leaq 264+rs(%rip), %rdi popq %rbx .cfi_remember_state .cfi_def_cfa_offset 24 popq %rbp .cfi_def_cfa_offset 16 popq %r12 .cfi_def_cfa_offset 8 jmp __libc_mutex_unlock@PLT .L54: .cfi_restore_state leaq 264+rs(%rip), %rdi call __libc_mutex_lock@PLT jmp .L44 .L55: call arc4_stir.constprop.1 .p2align 4,,8 jmp .L45 .cfi_endproc .LFE43: .size _arc4random_buf, .-_arc4random_buf .globl _arc4random_uniform .type _arc4random_uniform, @function _arc4random_uniform: .LFB44: .cfi_startproc pushq %r13 .cfi_def_cfa_offset 16 .cfi_offset 13, -16 pushq %r12 .cfi_def_cfa_offset 24 .cfi_offset 12, -24 pushq %rbp .cfi_def_cfa_offset 32 .cfi_offset 6, -32 pushq %rbx .cfi_def_cfa_offset 40 .cfi_offset 3, -40 subq $8, %rsp .cfi_def_cfa_offset 48 movl %edi, %r12d cmpl $1, %edi jbe .L64 movl %edi, %eax negl %eax xorl %edx, %edx divl %edi movl %edx, %ebp movq __isthreaded@GOTPCREL(%rip), %rax movl (%rax), %r13d testl %r13d, %r13d jne .L72 .L59: cmpb $0, rs(%rip) je .L73 .L60: movzbl 3+rs(%rip), %r11d movzbl 2+rs(%rip), %eax leal 4(%rax), %esi leaq rs(%rip), %rcx jmp .L62 .L74: movl %eax, %esi .L62: leal -3(%rsi), %edi movzbl %dil, %edi movzbl 4(%rcx,%rdi), %r8d addb %r8b, %r11b movzbl %r11b, %edx movzbl 4(%rcx,%rdx), %eax movb %al, 4(%rcx,%rdi) movb %r8b, 4(%rcx,%rdx) addb %r8b, %al movzbl %al, %eax movzbl 4(%rcx,%rax), %r9d sall $24, %r9d leal -2(%rsi), %edi movzbl %dil, %edi movzbl 4(%rcx,%rdi), %r8d addb %r8b, %r11b movzbl %r11b, %edx movzbl 4(%rcx,%rdx), %eax movb %al, 4(%rcx,%rdi) movb %r8b, 4(%rcx,%rdx) addb %r8b, %al movzbl %al, %eax movzbl 4(%rcx,%rax), %ebx sall $16, %ebx leal -1(%rsi), %edi movzbl %dil, %edi movzbl 4(%rcx,%rdi), %r8d addb %r8b, %r11b movzbl %r11b, %edx movzbl 4(%rcx,%rdx), %eax movb %al, 4(%rcx,%rdi) movb %r8b, 4(%rcx,%rdx) addb %r8b, %al movzbl %al, %eax movzbl 4(%rcx,%rax), %r8d sall $8, %r8d movzbl %sil, %edi movzbl 4(%rcx,%rdi), %r10d addb %r10b, %r11b movzbl %r11b, %edx movzbl 4(%rcx,%rdx), %eax movb %al, 4(%rcx,%rdi) movb %r10b, 4(%rcx,%rdx) addb %r10b, %al movzbl %al, %eax movzbl 4(%rcx,%rax), %eax orl %eax, %ebx orl %r9d, %ebx orl %r8d, %ebx leal 4(%rsi), %eax cmpl %ebx, %ebp ja .L74 movb %sil, 2+rs(%rip) movb %r11b, 3+rs(%rip) testl %r13d, %r13d jne .L75 .L63: movl %ebx, %eax xorl %edx, %edx divl %r12d movl %edx, %eax addq $8, %rsp .cfi_remember_state .cfi_def_cfa_offset 40 popq %rbx .cfi_def_cfa_offset 32 popq %rbp .cfi_def_cfa_offset 24 popq %r12 .cfi_def_cfa_offset 16 popq %r13 .cfi_def_cfa_offset 8 ret .L72: .cfi_restore_state leaq 264+rs(%rip), %rdi call __libc_mutex_lock@PLT jmp .L59 .L75: leaq 264+rs(%rip), %rdi call __libc_mutex_unlock@PLT jmp .L63 .L64: xorl %edx, %edx movl %edx, %eax addq $8, %rsp .cfi_remember_state .cfi_def_cfa_offset 40 popq %rbx .cfi_def_cfa_offset 32 popq %rbp .cfi_def_cfa_offset 24 popq %r12 .cfi_def_cfa_offset 16 popq %r13 .cfi_def_cfa_offset 8 ret .L73: .cfi_restore_state call arc4_stir.constprop.1 jmp .L60 .cfi_endproc .LFE44: .size _arc4random_uniform, .-_arc4random_uniform .data .align 32 .type rs, @object .size rs, 312 rs: .byte 0 .zero 1 .byte -1 .byte 0 .byte 0 .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte 16 .byte 17 .byte 18 .byte 19 .byte 20 .byte 21 .byte 22 .byte 23 .byte 24 .byte 25 .byte 26 .byte 27 .byte 28 .byte 29 .byte 30 .byte 31 .byte 32 .byte 33 .byte 34 .byte 35 .byte 36 .byte 37 .byte 38 .byte 39 .byte 40 .byte 41 .byte 42 .byte 43 .byte 44 .byte 45 .byte 46 .byte 47 .byte 48 .byte 49 .byte 50 .byte 51 .byte 52 .byte 53 .byte 54 .byte 55 .byte 56 .byte 57 .byte 58 .byte 59 .byte 60 .byte 61 .byte 62 .byte 63 .byte 64 .byte 65 .byte 66 .byte 67 .byte 68 .byte 69 .byte 70 .byte 71 .byte 72 .byte 73 .byte 74 .byte 75 .byte 76 .byte 77 .byte 78 .byte 79 .byte 80 .byte 81 .byte 82 .byte 83 .byte 84 .byte 85 .byte 86 .byte 87 .byte 88 .byte 89 .byte 90 .byte 91 .byte 92 .byte 93 .byte 94 .byte 95 .byte 96 .byte 97 .byte 98 .byte 99 .byte 100 .byte 101 .byte 102 .byte 103 .byte 104 .byte 105 .byte 106 .byte 107 .byte 108 .byte 109 .byte 110 .byte 111 .byte 112 .byte 113 .byte 114 .byte 115 .byte 116 .byte 117 .byte 118 .byte 119 .byte 120 .byte 121 .byte 122 .byte 123 .byte 124 .byte 125 .byte 126 .byte 127 .byte -128 .byte -127 .byte -126 .byte -125 .byte -124 .byte -123 .byte -122 .byte -121 .byte -120 .byte -119 .byte -118 .byte -117 .byte -116 .byte -115 .byte -114 .byte -113 .byte -112 .byte -111 .byte -110 .byte -109 .byte -108 .byte -107 .byte -106 .byte -105 .byte -104 .byte -103 .byte -102 .byte -101 .byte -100 .byte -99 .byte -98 .byte -97 .byte -96 .byte -95 .byte -94 .byte -93 .byte -92 .byte -91 .byte -90 .byte -89 .byte -88 .byte -87 .byte -86 .byte -85 .byte -84 .byte -83 .byte -82 .byte -81 .byte -80 .byte -79 .byte -78 .byte -77 .byte -76 .byte -75 .byte -74 .byte -73 .byte -72 .byte -71 .byte -70 .byte -69 .byte -68 .byte -67 .byte -66 .byte -65 .byte -64 .byte -63 .byte -62 .byte -61 .byte -60 .byte -59 .byte -58 .byte -57 .byte -56 .byte -55 .byte -54 .byte -53 .byte -52 .byte -51 .byte -50 .byte -49 .byte -48 .byte -47 .byte -46 .byte -45 .byte -44 .byte -43 .byte -42 .byte -41 .byte -40 .byte -39 .byte -38 .byte -37 .byte -36 .byte -35 .byte -34 .byte -33 .byte -32 .byte -31 .byte -30 .byte -29 .byte -28 .byte -27 .byte -26 .byte -25 .byte -24 .byte -23 .byte -22 .byte -21 .byte -20 .byte -19 .byte -18 .byte -17 .byte -16 .byte -15 .byte -14 .byte -13 .byte -12 .byte -11 .byte -10 .byte -9 .byte -8 .byte -7 .byte -6 .byte -5 .byte -4 .byte -3 .byte -2 .byte -1 .zero 4 .long 858980355 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .zero 4 .quad 0 .quad 0 .long 0 .zero 4 .quad 0 .ident "GCC: (NetBSD nb1 20120916) 4.8.1"