	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p9_socket_open
_p9_socket_open:                        ## @p9_socket_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rsi), %rcx
	movl	%eax, (%rcx)
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_sock_map_fd
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_p9_fd_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_P9_EPRINTK
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %ebx
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_P9_EPRINTK
	movq	%r14, %rdi
	callq	_sockfd_put
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p9_socket_open: failed to map fd\n"

L_.str.1:                               ## @.str.1
	.asciz	"p9_socket_open: failed to open fd\n"

	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.no_dead_strip	_p9_socket_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p9_socket_open
_p9_socket_open:                        ; @p9_socket_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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x1]
	str	w8, [x9]
	mov	x0, x1
	mov	w1, #0
	bl	_sock_map_fd
	mov	x19, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x19
	bl	_p9_fd_open
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w19, #0
Lloh3:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_P9_EPRINTK
	b	LBB0_5
LBB0_4:
	mov	x19, x0
Lloh11:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_P9_EPRINTK
	mov	x0, x20
	bl	_sockfd_put
LBB0_5:
	mov	x0, 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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p9_socket_open: failed to map fd\n"

l_.str.1:                               ; @.str.1
	.asciz	"p9_socket_open: failed to open fd\n"

	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.no_dead_strip	_p9_socket_open
.subsections_via_symbols
