	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fileargs_open                  ## -- Begin function fileargs_open
	.p2align	4, 0x90
_fileargs_open:                         ## @fileargs_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	movq	(%rbx), %rax
	movq	_FILEARGS_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_fileargs_get_fd_cache
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_fileargs_fetch
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_nvlist_take_descriptor
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_nvlist_take_string
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%r15, %rdi
	callq	_nvlist_destroy
	jmp	LBB0_13
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ENOTCAPABLE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	movl	$-1, %r14d
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_fileargs_set_cache
LBB0_13:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_FILEARGS_MAGIC,8,3             ## @FILEARGS_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOTCAPABLE,4,2                ## @ENOTCAPABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open"

L_.str.1:                               ## @.str.1
	.asciz	"fd"

L_.str.2:                               ## @.str.2
	.asciz	"cmd"

L_.str.3:                               ## @.str.3
	.asciz	"cache"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fileargs_open                  ; -- Begin function fileargs_open
	.p2align	2
_fileargs_open:                         ; @fileargs_open
	.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	x21, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _FILEARGS_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FILEARGS_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	cbz	x21, LBB0_6
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_fileargs_get_fd_cache
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.3:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_fileargs_fetch
	cbz	x0, LBB0_9
; %bb.4:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nvlist_take_descriptor
	mov	x20, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_nvlist_take_string
	mov	x22, x0
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.5:
	mov	x0, x21
	bl	_nvlist_destroy
	b	LBB0_12
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _ENOTCAPABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTCAPABLE@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _errno@GOTPAGE
Lloh16:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
LBB0_9:
	mov	w20, #-1
LBB0_10:
	mov	x0, x20
	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
LBB0_11:
	mov	x0, x19
	mov	x1, x21
	bl	_fileargs_set_cache
LBB0_12:
	mov	x0, x22
	bl	_free
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FILEARGS_MAGIC,8,3             ; @FILEARGS_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOTCAPABLE,4,2                ; @ENOTCAPABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open"

l_.str.1:                               ; @.str.1
	.asciz	"fd"

l_.str.2:                               ; @.str.2
	.asciz	"cmd"

l_.str.3:                               ; @.str.3
	.asciz	"cache"

.subsections_via_symbols
