	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__passwdqc_random               ## -- Begin function _passwdqc_random
	.p2align	4, 0x90
__passwdqc_random:                      ## @_passwdqc_random
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %r13d
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.1:
	leal	2(%r13), %eax
	cltq
	imulq	$-2004318071, %rax, %rax        ## imm = 0x88888889
	shrq	$32, %rax
	addl	%r13d, %eax
	addl	$2, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$3, %eax
	leal	(%rax,%rcx), %edx
	leal	(%rax,%rcx), %r14d
	incl	%r14d
	movl	%r14d, %eax
	notl	%eax
	leal	(%rax,%rdx,8), %eax
	addl	$8, %eax
	cmpl	$255, %eax
	ja	LBB0_3
## %bb.4:
	cmpl	4(%rdi), %eax
	jg	LBB0_3
## %bb.6:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	movl	%eax, %r15d
	leaq	-42(%rbp), %rsi
	movl	%eax, %edi
	movl	$2, %edx
	callq	_read_loop
	cmpl	$2, %eax
	jne	LBB0_17
## %bb.8:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	leal	11(%r13), %eax
	cltq
	imulq	$715827883, %rax, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$33, %rcx
	addl	%eax, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	__passwdqc_random.output(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_3:
	xorl	%r12d, %r12d
LBB0_22:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	movzbl	-41(%rbp), %eax
	shrl	$4, %eax
	andl	$7, %eax
	movq	_SEPARATORS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movzbl	(%rcx,%rax), %eax
	movb	%al, (%r14,%r12)
	addl	$-15, %r13d
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r14
	movl	%r15d, %edi
	leaq	-42(%rbp), %rsi
	movl	$2, %edx
	callq	_read_loop
	cmpl	$2, %eax
	jne	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-41(%rbp), %eax
	andl	$15, %eax
	shlq	$8, %rax
	movzbl	-42(%rbp), %ecx
	orq	%rax, %rcx
	movq	__passwdqc_wordset_4k@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_memchr
	leaq	6(%rbx), %rdx
	testq	%rax, %rax
	cmovneq	%rax, %rdx
	movl	%r14d, %edi
	subq	%rbx, %rdx
	leaq	(%rdx,%rdi), %r14
	cmpq	$254, %r14
	ja	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	%r12, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$16, %r13d
	jge	LBB0_9
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$13, %r13d
	jl	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	addl	$-12, %r13d
	movb	$32, (%r14,%r12)
	jmp	LBB0_10
LBB0_17:
	xorl	%r12d, %r12d
LBB0_21:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_22
LBB0_20:
	leaq	-42(%rbp), %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_memset
	movb	$0, (%r14,%r12)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,__passwdqc_random.output,256,4 ## @_passwdqc_random.output
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/urandom"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	__passwdqc_wordset_4k,8,3       ## @_passwdqc_wordset_4k
	.comm	_SEPARATORS,8,3                 ## @SEPARATORS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__passwdqc_random               ; -- Begin function _passwdqc_random
	.p2align	2
__passwdqc_random:                      ; @_passwdqc_random
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w22, [x0]
	cbz	w22, LBB0_6
; %bb.1:
	add	w8, w22, #2
	mov	w9, #34953
	movk	w9, #34952, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #3
	add	w8, w9, w8, lsr #31
	add	w23, w8, #1
	mvn	w8, w23
	add	w8, w8, w23, lsl #3
	cmp	w8, #255
	b.hi	LBB0_6
; %bb.2:
	ldr	w9, [x0, #4]
	cmp	w8, w9
	b.gt	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x19, x0
	add	x1, sp, #14
	mov	w2, #2
	bl	_read_loop
	cmp	w0, #2
	b.ne	LBB0_15
; %bb.5:
	mov	x28, #0
	add	w8, w22, #11
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
Lloh5:
	adrp	x24, __passwdqc_wordset_4k@GOTPAGE
Lloh6:
	ldr	x24, [x24, __passwdqc_wordset_4k@GOTPAGEOFF]
	add	w25, w8, w9
Lloh7:
	adrp	x20, __passwdqc_random.output@PAGE
Lloh8:
	add	x20, x20, __passwdqc_random.output@PAGEOFF
Lloh9:
	adrp	x26, _SEPARATORS@GOTPAGE
Lloh10:
	ldr	x26, [x26, _SEPARATORS@GOTPAGEOFF]
	mov	w27, #32
	b	LBB0_10
LBB0_6:
	mov	x20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldrb	w8, [sp, #15]
	ubfx	x8, x8, #4, #3
	ldr	x9, [x26]
	ldrb	w8, [x9, x8]
	strb	w8, [x20, x28]
	sub	w22, w22, #15
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x28, x28, #1
	add	x1, sp, #14
	mov	x0, x19
	mov	w2, #2
	bl	_read_loop
	cmp	w0, #2
	b.ne	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [sp, #15]
	and	x8, x8, #0xf
	ldrb	w9, [sp, #14]
	ldr	x10, [x24]
	lsl	x9, x9, #3
	bfi	x9, x8, #11, #4
	ldr	x21, [x10, x9]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #6
	bl	_memchr
	add	x8, x21, #6
	cmp	x0, #0
	csel	x9, x8, x0, eq
	and	x8, x28, #0xffffffff
	sub	x2, x9, x21
	add	x28, x2, x8
	cmp	x28, #254
	b.hi	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x0, x20, x8
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	cmp	w25, w23
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w22, #16
	b.ge	LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w22, #13
	b.lt	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	w22, w22, #12
	strb	w27, [x20, x28]
	b	LBB0_9
LBB0_15:
	mov	x20, #0
LBB0_16:
	mov	x0, x19
	bl	_close
	b	LBB0_7
LBB0_17:
	add	x0, sp, #14
	mov	w1, #0
	mov	w2, #2
	bl	_memset
	strb	wzr, [x20, x28]
	b	LBB0_16
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,__passwdqc_random.output,256,0 ; @_passwdqc_random.output
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/urandom"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	__passwdqc_wordset_4k,8,3       ; @_passwdqc_wordset_4k
	.comm	_SEPARATORS,8,3                 ; @SEPARATORS
.subsections_via_symbols
