	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function robust_open
_robust_open:                           ## @robust_open
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	%edx, %r13d
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_SQLITE_DEFAULT_FILE_PERMISSIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_osOpen
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SQLITE_MINIMUM_FILE_DESCRIPTOR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_osClose
	movq	_SQLITE_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_sqlite3_log
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_osOpen
	testl	%eax, %eax
	jns	LBB0_2
## %bb.6:
	movl	$-1, %ebx
	jmp	LBB0_11
LBB0_7:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.8:
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	callq	_osFstat
	orq	-56(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movl	$511, %eax                      ## imm = 0x1FF
	andl	-48(%rbp), %eax
	cmpl	%r14d, %eax
	je	LBB0_11
## %bb.10:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_osFchmod
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_DEFAULT_FILE_PERMISSIONS,4,2 ## @SQLITE_DEFAULT_FILE_PERMISSIONS
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_SQLITE_MINIMUM_FILE_DESCRIPTOR,4,2 ## @SQLITE_MINIMUM_FILE_DESCRIPTOR
	.comm	_SQLITE_WARNING,4,2             ## @SQLITE_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempt to open \"%s\" as file descriptor %d"

L_.str.1:                               ## @.str.1
	.asciz	"/dev/null"

	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.comm	_F_GETFD,4,2                    ## @F_GETFD
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.no_dead_strip	_robust_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function robust_open
_robust_open:                           ; @robust_open
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _SQLITE_DEFAULT_FILE_PERMISSIONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_DEFAULT_FILE_PERMISSIONS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w23, w8, w2, eq
Lloh3:
	adrp	x27, _EINTR@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
Lloh5:
	adrp	x28, _SQLITE_MINIMUM_FILE_DESCRIPTOR@GOTPAGE
Lloh6:
	ldr	x28, [x28, _SQLITE_MINIMUM_FILE_DESCRIPTOR@GOTPAGEOFF]
Lloh7:
	adrp	x26, _SQLITE_WARNING@GOTPAGE
Lloh8:
	ldr	x26, [x26, _SQLITE_WARNING@GOTPAGEOFF]
Lloh9:
	adrp	x24, l_.str@PAGE
Lloh10:
	add	x24, x24, l_.str@PAGEOFF
Lloh11:
	adrp	x25, l_.str.1@PAGE
Lloh12:
	add	x25, x25, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_osOpen
	mov	x20, x0
	tbnz	w0, #31, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w20, w8
	b.ge	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_osClose
	ldr	w0, [x26]
	mov	x1, x24
	mov	x2, x22
	mov	x3, x20
	bl	_sqlite3_log
	mov	x0, x25
	mov	x1, x21
	mov	x2, x19
	bl	_osOpen
	tbz	w0, #31, LBB0_2
; %bb.5:
	mov	w20, #-1
	b	LBB0_10
LBB0_6:
	cbz	w19, LBB0_10
; %bb.7:
	mov	x1, sp
	mov	x0, x20
	bl	_osFstat
	ldr	x8, [sp]
	orr	x8, x0, x8
	cbnz	x8, LBB0_10
; %bb.8:
	ldr	w8, [sp, #8]
	and	w8, w8, #0x1ff
	cmp	w8, w19
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	bl	_osFchmod
LBB0_10:
	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
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_DEFAULT_FILE_PERMISSIONS,4,2 ; @SQLITE_DEFAULT_FILE_PERMISSIONS
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_SQLITE_MINIMUM_FILE_DESCRIPTOR,4,2 ; @SQLITE_MINIMUM_FILE_DESCRIPTOR
	.comm	_SQLITE_WARNING,4,2             ; @SQLITE_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempt to open \"%s\" as file descriptor %d"

l_.str.1:                               ; @.str.1
	.asciz	"/dev/null"

	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.comm	_F_GETFD,4,2                    ; @F_GETFD
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.no_dead_strip	_robust_open
.subsections_via_symbols
