	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getentropy_urandom
_getentropy_urandom:                    ## @getentropy_urandom
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_O_RDONLY@GOTPCREL(%rip), %r15
	leaq	L_.str(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %eax
	cmpl	(%r14), %eax
	je	LBB0_1
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %ebx
	movq	_F_SETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_F_GETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_fcntl
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fcntl
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edi
	callq	_fstat
	cmpl	$-1, %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_10
## %bb.4:
	movl	-48(%rbp), %edi
	callq	_S_ISCHR
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	testq	%r15, %r15
	je	LBB0_14
## %bb.6:
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cltq
	addq	%rax, %r12
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%r15, %r12
	jae	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdx
	subq	%r12, %rdx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12), %rsi
	movl	%ebx, %edi
	callq	_read
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %eax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	(%r14), %eax
	je	LBB0_13
LBB0_10:
	movl	%ebx, %edi
	callq	_close
	jmp	LBB0_11
LBB0_14:
	movl	%ebx, %edi
	callq	_close
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_gotdata
	testq	%rax, %rax
	je	LBB0_15
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %eax
LBB0_16:
	movl	%ecx, (%r13)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%eax, %eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/urandom"

	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_F_GETFD,4,2                    ## @F_GETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_O_NOFOLLOW,4,2                 ## @O_NOFOLLOW
	.no_dead_strip	_getentropy_urandom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getentropy_urandom
_getentropy_urandom:                    ; @getentropy_urandom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	ldr	w24, [x23]
Lloh2:
	adrp	x26, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x26, [x26, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x25, _EINTR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_1
	b	LBB0_13
LBB0_3:
	mov	x21, x0
Lloh8:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
Lloh11:
	adrp	x8, _F_GETFD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _F_GETFD@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_fcntl
Lloh14:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w8, w8, w0
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x22
	bl	_fcntl
	add	x1, sp, #8
	mov	x0, x21
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.4:
	ldr	w0, [sp, #8]
	bl	_S_ISCHR
	cbz	w0, LBB0_11
; %bb.5:
	cbz	x19, LBB0_12
; %bb.6:
	mov	x22, #0
Lloh17:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh18:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, w0, sxtw
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	cmp	x22, x19
	b.hs	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	x2, x19, x22
	add	x1, x20, x22
	mov	x0, x21
	bl	_read
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x26]
	ldr	w10, [x25]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.eq	LBB0_8
LBB0_11:
	mov	x0, x21
	bl	_close
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	bl	_close
	mov	x0, x20
	mov	x1, x19
	bl	_gotdata
	cbz	x0, LBB0_14
LBB0_13:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w24, [x8]
	mov	w0, #-1
LBB0_14:
	str	w24, [x23]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/urandom"

	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_F_GETFD,4,2                    ; @F_GETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_O_NOFOLLOW,4,2                 ; @O_NOFOLLOW
	.no_dead_strip	_getentropy_urandom
.subsections_via_symbols
