	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p9_fd_open
_p9_fd_open:                            ## @p9_fd_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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	%r12d, %edi
	callq	_fget
	movq	%rax, 8(%rbx)
	movl	%r15d, %edi
	callq	_fget
	movq	%rax, (%rbx)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:
	movq	%rbx, 8(%r14)
	movq	_Connected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_fput
	movq	(%rbx), %rax
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %rdi
	callq	_fput
LBB0_9:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_Connected,4,2                  ## @Connected
	.no_dead_strip	_p9_fd_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p9_fd_open
_p9_fd_open:                            ; @p9_fd_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, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x22
	bl	_fget
	str	x0, [x19, #8]
	mov	x0, x21
	bl	_fget
	str	x0, [x19]
	ldr	x8, [x19, #8]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_9
; %bb.2:
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x8
	bl	_fput
	ldr	x0, [x19]
LBB0_4:
	cbz	x0, LBB0_6
; %bb.5:
	bl	_fput
LBB0_6:
	mov	x0, x19
	bl	_kfree
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
	str	x19, [x20, #8]
Lloh7:
	adrp	x8, _Connected@GOTPAGE
Lloh8:
	ldr	x8, [x8, _Connected@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_Connected,4,2                  ; @Connected
	.no_dead_strip	_p9_fd_open
.subsections_via_symbols
