	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_file_fd
_open_file_fd:                          ## @open_file_fd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	8(%rsi), %edi
	movl	%edx, %esi
	callq	_open
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_fserr_exit
LBB0_2:
	movq	_OPTST_ALLOC_ARG@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	callq	_VOIDP
	movl	%eax, 12(%rbx)
	jmp	LBB0_5
LBB0_4:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rdx
	callq	_AGDUPSTR
LBB0_5:
	movl	%r14d, 4(%rbx)
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open"

	.comm	_OPTST_ALLOC_ARG,4,2            ## @OPTST_ALLOC_ARG
L_.str.1:                               ## @.str.1
	.asciz	"file name"

	.no_dead_strip	_open_file_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_file_fd
_open_file_fd:                          ; @open_file_fd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x1, #8]
	mov	x1, x2
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	ldr	w2, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fserr_exit
LBB0_2:
	ldr	w8, [x19]
Lloh2:
	adrp	x21, _OPTST_ALLOC_ARG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _OPTST_ALLOC_ARG@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_VOIDP
	str	w0, [x19, #12]
	b	LBB0_5
LBB0_4:
	ldp	w1, w0, [x19, #8]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_AGDUPSTR
LBB0_5:
	ldr	w8, [x21]
	ldr	w9, [x19]
	bic	w8, w9, w8
	stp	w8, w20, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open"

	.comm	_OPTST_ALLOC_ARG,4,2            ; @OPTST_ALLOC_ARG
l_.str.1:                               ; @.str.1
	.asciz	"file name"

	.no_dead_strip	_open_file_fd
.subsections_via_symbols
