	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aes_load_pwd_file              ## -- Begin function aes_load_pwd_file
	.p2align	4, 0x90
_aes_load_pwd_file:                     ## @aes_load_pwd_file
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_O_RDONLY@GOTPCREL(%rip), %r12
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_rand_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	movl	$16, %edx
	callq	_read
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_5:
	movl	%ebx, %edi
	callq	_close
	cmpl	$15, %r15d
	jle	LBB0_6
	jmp	LBB0_10
LBB0_1:
	xorl	%r15d, %r15d
LBB0_6:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	%eax, %r13d
	movq	_rand_buf@GOTPCREL(%rip), %rax
	movslq	%r15d, %rbx
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movl	$16, %edx
	subl	%ebx, %edx
	movl	%r13d, %edi
	callq	_read
	addl	%ebx, %eax
	cmpl	$16, %eax
	jne	LBB0_7
## %bb.9:
	movl	%r13d, %edi
	callq	_close
LBB0_10:
	xorl	%eax, %eax
	callq	_lrand48
	movq	_rand_buf@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorq	%rax, (%rdx)
	movq	(%rcx), %rax
	movq	(%rax), %rdi
	callq	_srand48
	movq	_DEFAULT_PWD_FILE@GOTPCREL(%rip), %rax
	movq	%r14, %rdi
	testq	%r14, %r14
	jne	LBB0_12
## %bb.11:
	movq	(%rax), %rdi
LBB0_12:
	movl	(%r12), %esi
	callq	_open
	movl	$-1, %r15d
	testl	%eax, %eax
	js	LBB0_20
## %bb.13:
	movl	%eax, %ebx
	movq	_pwd_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MAX_PWD_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	incl	%edx
	movl	%ebx, %edi
	callq	_read
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_close
	movq	_MIN_PWD_LEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_20
## %bb.14:
	cmpl	(%r13), %r12d
	jg	LBB0_20
## %bb.15:
	movq	_pwd_len@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_19
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%r14, %r14
	jne	LBB0_18
## %bb.17:
	movq	_DEFAULT_PWD_FILE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_18:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_19:
	movq	_aes_initialized@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	$1, %r15d
	jmp	LBB0_20
LBB0_7:
	movq	_pwd_len@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	$-1, %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/random"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_rand_buf,8,3                   ## @rand_buf
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"added %d bytes of real entropy to the AES security key\n"

L_.str.2:                               ## @.str.2
	.asciz	"/dev/urandom"

	.comm	_pwd_len,4,2                    ## @pwd_len
	.comm	_DEFAULT_PWD_FILE,8,3           ## @DEFAULT_PWD_FILE
	.comm	_pwd_buf,8,3                    ## @pwd_buf
	.comm	_MAX_PWD_LEN,4,2                ## @MAX_PWD_LEN
	.comm	_MIN_PWD_LEN,4,2                ## @MIN_PWD_LEN
L_.str.3:                               ## @.str.3
	.asciz	"loaded password file %s\n"

	.comm	_aes_initialized,4,2            ## @aes_initialized
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aes_load_pwd_file              ; -- Begin function aes_load_pwd_file
	.p2align	2
_aes_load_pwd_file:                     ; @aes_load_pwd_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x22, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _O_RDONLY@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
Lloh7:
	adrp	x23, _rand_buf@GOTPAGE
Lloh8:
	ldr	x23, [x23, _rand_buf@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x1, [x23]
	mov	w2, #16
	bl	_read
	mov	x20, x0
Lloh9:
	adrp	x8, _verbosity@GOTPAGE
Lloh10:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, #1
	ccmp	w8, #2, #8, ge
	b.lt	LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_3:
	mov	x0, x21
	bl	_close
	cmp	w20, #15
	b.le	LBB0_5
	b	LBB0_8
LBB0_4:
	mov	w20, #0
LBB0_5:
	ldr	w1, [x22]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_open
	tbnz	w0, #31, LBB0_13
; %bb.6:
	mov	x21, x0
	ldr	x8, [x23]
	add	x1, x8, w20, sxtw
	mov	w8, #16
	sub	w2, w8, w20
	bl	_read
	add	w8, w0, w20
	cmp	w8, #16
	b.ne	LBB0_13
; %bb.7:
	mov	x0, x21
	bl	_close
LBB0_8:
	bl	_lrand48
	ldr	x8, [x23]
	ldr	x9, [x8]
	eor	x9, x9, x0
	str	x9, [x8]
	ldr	x8, [x23]
	ldr	x0, [x8]
	bl	_srand48
Lloh19:
	adrp	x23, _DEFAULT_PWD_FILE@GOTPAGE
Lloh20:
	ldr	x23, [x23, _DEFAULT_PWD_FILE@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x19, #0
	csel	x0, x8, x19, eq
	ldr	w1, [x22]
	bl	_open
	tbnz	w0, #31, LBB0_14
; %bb.9:
	mov	x20, x0
Lloh21:
	adrp	x8, _pwd_buf@GOTPAGE
Lloh22:
	ldr	x8, [x8, _pwd_buf@GOTPAGEOFF]
Lloh23:
	ldr	x1, [x8]
Lloh24:
	adrp	x22, _MAX_PWD_LEN@GOTPAGE
Lloh25:
	ldr	x22, [x22, _MAX_PWD_LEN@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w2, w8, #1
	bl	_read
	mov	x21, x0
	mov	x0, x20
	bl	_close
Lloh26:
	adrp	x8, _MIN_PWD_LEN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MIN_PWD_LEN@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x22]
	cmp	w21, w8
	ccmp	w21, w9, #0, ge
	b.gt	LBB0_14
; %bb.10:
Lloh29:
	adrp	x8, _pwd_len@GOTPAGE
Lloh30:
	ldr	x8, [x8, _pwd_len@GOTPAGEOFF]
Lloh31:
	str	w21, [x8]
Lloh32:
	adrp	x8, _verbosity@GOTPAGE
Lloh33:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.11:
Lloh35:
	adrp	x8, _stderr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	ldr	x8, [x23]
	cmp	x19, #0
	csel	x8, x8, x19, eq
	str	x8, [sp]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
LBB0_12:
Lloh40:
	adrp	x8, _aes_initialized@GOTPAGE
Lloh41:
	ldr	x8, [x8, _aes_initialized@GOTPAGEOFF]
	mov	w0, #1
Lloh42:
	str	w0, [x8]
	b	LBB0_15
LBB0_13:
Lloh43:
	adrp	x8, _pwd_len@GOTPAGE
Lloh44:
	ldr	x8, [x8, _pwd_len@GOTPAGEOFF]
Lloh45:
	str	wzr, [x8]
LBB0_14:
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotStr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/random"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_rand_buf,8,3                   ; @rand_buf
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"added %d bytes of real entropy to the AES security key\n"

l_.str.2:                               ; @.str.2
	.asciz	"/dev/urandom"

	.comm	_pwd_len,4,2                    ; @pwd_len
	.comm	_DEFAULT_PWD_FILE,8,3           ; @DEFAULT_PWD_FILE
	.comm	_pwd_buf,8,3                    ; @pwd_buf
	.comm	_MAX_PWD_LEN,4,2                ; @MAX_PWD_LEN
	.comm	_MIN_PWD_LEN,4,2                ; @MIN_PWD_LEN
l_.str.3:                               ; @.str.3
	.asciz	"loaded password file %s\n"

	.comm	_aes_initialized,4,2            ; @aes_initialized
.subsections_via_symbols
