	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dt_opt_ctypes
_dt_opt_ctypes:                         ## @dt_opt_ctypes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open64
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_close
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_EDT_BADOPTVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dt_set_errno                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EDT_BADOPTVAL,4,2              ## @EDT_BADOPTVAL
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_dt_opt_ctypes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dt_opt_ctypes
_dt_opt_ctypes:                         ; @dt_opt_ctypes
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	x1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x0, x1
	mov	x1, x8
	mov	w2, #438
	bl	_open64
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_close
	str	w20, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh6:
	adrp	x8, _EDT_BADOPTVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDT_BADOPTVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dt_set_errno
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EDT_BADOPTVAL,4,2              ; @EDT_BADOPTVAL
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_dt_opt_ctypes
.subsections_via_symbols
