	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scif_listen                    ## -- Begin function scif_listen
	.p2align	4, 0x90
_scif_listen:                           ## @scif_listen
	.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	%esi, %r12d
	movq	%rdi, %rbx
	movq	_scif_info@GOTPCREL(%rip), %r14
	movl	8(%r14), %edi
	movq	_scif_ep_states@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_dbg
	leaq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	(%rbx), %rax
	addq	$-128, %rax
	cmpq	$8, %rax
	ja	LBB0_5
## %bb.1:
	movl	$403, %ecx                      ## imm = 0x193
	movq	%r15, %rdi
	btq	%rax, %rcx
	jae	LBB0_4
## %bb.2:
	callq	_spin_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	callq	_spin_unlock
	movq	_EISCONN@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	$131, (%rbx)
	movl	%r12d, 8(%rbx)
	leaq	36(%rbx), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	callq	_INIT_LIST_HEAD
	leaq	32(%rbx), %rdi
	callq	_init_waitqueue_head
	leaq	28(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_scif_teardown_ep
	movq	$0, 16(%rbx)
	movq	%r14, %rdi
	callq	_mutex_lock
	addq	$12, %rbx
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_scif_info,12,2                 ## @scif_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCIFAPI listen: ep %p %s\n"

	.comm	_scif_ep_states,8,3             ## @scif_ep_states
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EISCONN,4,2                    ## @EISCONN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scif_listen                    ; -- Begin function scif_listen
	.p2align	2
_scif_listen:                           ; @scif_listen
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x19, _scif_info@GOTPAGE
Lloh1:
	ldr	x19, [x19, _scif_info@GOTPAGEOFF]
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _scif_ep_states@GOTPAGE
Lloh3:
	ldr	x8, [x8, _scif_ep_states@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w3, [x8, x9, lsl #2]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	add	x21, x20, #24
	mov	x0, x21
	bl	_spin_lock
	ldr	x8, [x20]
	sub	x8, x8, #128
	cmp	x8, #8
	b.hi	LBB0_6
; %bb.1:
	mov	w9, #1
	lsl	x8, x9, x8
	mov	w9, #403
	mov	x0, x21
	tst	x8, x9
	b.eq	LBB0_3
; %bb.2:
	bl	_spin_unlock
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	bl	_spin_unlock
Lloh9:
	adrp	x8, _EISCONN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
	mov	w8, #131
	str	x8, [x20]
	str	w22, [x20, #8]
	add	x0, x20, #36
	stp	xzr, xzr, [x20, #40]
	bl	_INIT_LIST_HEAD
	add	x0, x20, #32
	bl	_init_waitqueue_head
	add	x0, x20, #28
	bl	_INIT_LIST_HEAD
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x20
	bl	_scif_teardown_ep
	str	xzr, [x20, #16]
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x20, #12
	add	x1, x19, #4
	bl	_list_add_tail
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_scif_info,12,2                 ; @scif_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCIFAPI listen: ep %p %s\n"

	.comm	_scif_ep_states,8,3             ; @scif_ep_states
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EISCONN,4,2                    ; @EISCONN
.subsections_via_symbols
