	.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	%esi, %r15d
	movq	%rdi, %r12
	movl	%edx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_SQLITE_DEFAULT_FILE_PERMISSIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_2:
	movq	_EINTR@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_osOpen
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_3
LBB0_5:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.6:
	testl	%ebx, %ebx
	js	LBB0_10
## %bb.7:
	leaq	-64(%rbp), %rsi
	movl	%ebx, %edi
	callq	_osFstat
	orq	-64(%rbp), %rax
	jne	LBB0_10
## %bb.8:
	movl	$511, %eax                      ## imm = 0x1FF
	andl	-56(%rbp), %eax
	cmpl	%r14d, %eax
	je	LBB0_10
## %bb.9:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_osFchmod
LBB0_10:
	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	_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, #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, 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, w2, w8, ne
Lloh3:
	adrp	x24, _errno@GOTPAGE
Lloh4:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x25, _EINTR@GOTPAGE
Lloh6:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_osOpen
	mov	x20, x0
	tbz	w0, #31, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_3:
	cbz	w19, LBB0_8
; %bb.4:
	tbnz	w20, #31, LBB0_8
; %bb.5:
	mov	x1, sp
	mov	x0, x20
	bl	_osFstat
	ldr	x8, [sp]
	orr	x8, x0, x8
	cbnz	x8, LBB0_8
; %bb.6:
	ldr	w8, [sp, #8]
	and	w8, w8, #0x1ff
	cmp	w8, w19
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_osFchmod
LBB0_8:
	mov	x0, x20
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	_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
