	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _scif_recv
__scif_recv:                            ## @_scif_recv
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SCIF_RECV_BLOCK@GOTPCREL(%rip), %rax
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_might_sleep
LBB0_2:
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	xorl	%eax, %eax
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movzbl	%al, %esi
	movl	%ebx, %edi
	callq	_wait_event_interruptible
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_lock
	testl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_scif_rb_count
	testl	%eax, %eax
	jne	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movq	_SCIF_RECV_BLOCK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_SCIF_ENDPT_QP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%esi
	movl	%r13d, %edi
	callq	_min
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_spin_unlock
	movl	12(%r15), %ebx
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movb	$1, %al
	cmpq	(%r15), %rcx
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_scif_rb_count
	cmpl	%r14d, %eax
	setge	%al
	jmp	LBB0_17
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_min
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	callq	_scif_rb_get_next
	movq	(%r15), %rax
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_scif_rb_update_read_ptr
	movl	24(%r15), %eax
	movl	%eax, -76(%rbp)
	movq	_SCIF_CLIENT_RCVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	20(%r15), %eax
	movq	-88(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	16(%r15), %edi
	leaq	-88(%rbp), %rsi
	callq	__scif_nodeqp_send
	testl	%eax, %eax
	jne	LBB0_19
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movslq	%ecx, %rax
	addq	%rax, -72(%rbp)                 ## 8-byte Folded Spill
	subl	%ecx, %r13d
	movl	$0, %eax
	jne	LBB0_5
## %bb.12:
	xorl	%r13d, %r13d
	subl	%r13d, %ebx
	jne	LBB0_26
	jmp	LBB0_20
LBB0_7:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	xorl	%eax, %eax
	subl	%r13d, %ebx
	jne	LBB0_26
	jmp	LBB0_20
LBB0_3:
	xorl	%r13d, %r13d
LBB0_19:
	subl	%r13d, %ebx
	jne	LBB0_26
LBB0_20:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.21:
	movq	(%r15), %rax
	movq	_SCIFEP_CONNECTED@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_26
## %bb.22:
	movq	_SCIFEP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.24:
	movq	_ECONNRESET@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_18:
	movl	%ebx, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	%r13d, %ebx
	jne	LBB0_26
	jmp	LBB0_20
LBB0_23:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
LBB0_25:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movq	%r12, %rdi
	callq	_spin_unlock
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCIF_RECV_BLOCK,4,2            ## @SCIF_RECV_BLOCK
	.comm	_SCIFEP_CONNECTED,8,3           ## @SCIFEP_CONNECTED
	.comm	_SCIFEP_DISCONNECTED,8,3        ## @SCIFEP_DISCONNECTED
	.comm	_SCIF_CLIENT_RCVD,4,2           ## @SCIF_CLIENT_RCVD
	.comm	_SCIF_ENDPT_QP_SIZE,4,2         ## @SCIF_ENDPT_QP_SIZE
	.comm	_ECONNRESET,4,2                 ## @ECONNRESET
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.no_dead_strip	__scif_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _scif_recv
__scif_recv:                            ; @_scif_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x25, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x24, [x0, #32]
Lloh0:
	adrp	x28, _SCIF_RECV_BLOCK@GOTPAGE
Lloh1:
	ldr	x28, [x28, _SCIF_RECV_BLOCK@GOTPAGEOFF]
	ldr	w8, [x28]
	tst	w8, w3
	b.eq	LBB0_2
; %bb.1:
	bl	_might_sleep
LBB0_2:
	add	x19, x20, #8
	mov	x0, x19
	bl	_spin_lock
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	cbz	w25, LBB0_17
; %bb.3:
	str	x21, [sp]                       ; 8-byte Folded Spill
Lloh2:
	adrp	x23, _SCIFEP_CONNECTED@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SCIFEP_CONNECTED@GOTPAGEOFF]
Lloh4:
	adrp	x21, _SCIFEP_DISCONNECTED@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SCIFEP_DISCONNECTED@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	mov	x1, x27
	bl	_scif_rb_count
	cmp	w0, w27
	cset	w1, ge
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	bl	_wait_event_interruptible
	mov	x26, x0
	mov	x0, x19
	bl	_spin_lock
	cbnz	w26, LBB0_16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x20]
	ldr	x10, [x21]
	cmp	x8, x9
	ccmp	x10, x9, #4, ne
	b.ne	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	mov	x1, x25
	bl	_scif_rb_count
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x28]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh6:
	adrp	x8, _SCIF_ENDPT_QP_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCIF_ENDPT_QP_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	sub	w1, w8, #1
	mov	x0, x25
	bl	_min
	mov	x27, x0
	mov	x0, x19
	bl	_spin_unlock
	ldr	w26, [x20, #12]
	ldr	x8, [x23]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w1, #1
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x0
	mov	x0, x25
	bl	_min
	mov	x27, x0
	mov	x0, x24
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	mov	x2, x27
	bl	_scif_rb_get_next
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_scif_rb_update_read_ptr
Lloh9:
	adrp	x8, _SCIF_CLIENT_RCVD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCIF_CLIENT_RCVD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldp	w10, w9, [x20, #20]
	stp	w8, w9, [sp, #24]
	ldr	x8, [sp, #16]
	str	w10, [x8]
	ldr	w0, [x20, #16]
	add	x1, sp, #16
	bl	__scif_nodeqp_send
	cbnz	w0, LBB0_25
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #0
	mov	w26, #0
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x9, x9, w27, sxtw
	str	x9, [sp]                        ; 8-byte Folded Spill
	subs	w25, w25, w27
	b.ne	LBB0_6
	b	LBB0_18
LBB0_15:
	mov	w26, #0
LBB0_16:
	mov	x8, x25
	b	LBB0_18
LBB0_17:
	mov	w8, #0
	mov	w26, #0
LBB0_18:
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	subs	w8, w9, w8
	b.eq	LBB0_20
; %bb.19:
	mov	x26, x8
	b	LBB0_24
LBB0_20:
	cbnz	w26, LBB0_24
; %bb.21:
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _SCIFEP_CONNECTED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SCIFEP_CONNECTED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.22:
	mov	w26, #0
	b	LBB0_24
LBB0_23:
Lloh15:
	adrp	x9, _SCIFEP_DISCONNECTED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SCIFEP_DISCONNECTED@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _ECONNRESET@GOTPAGE
Lloh19:
	ldr	x10, [x10, _ECONNRESET@GOTPAGEOFF]
Lloh20:
	adrp	x11, _ENOTCONN@GOTPAGE
Lloh21:
	ldr	x11, [x11, _ENOTCONN@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	neg	w26, w8
LBB0_24:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	mov	x26, x0
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SCIF_RECV_BLOCK,4,2            ; @SCIF_RECV_BLOCK
	.comm	_SCIFEP_CONNECTED,8,3           ; @SCIFEP_CONNECTED
	.comm	_SCIFEP_DISCONNECTED,8,3        ; @SCIFEP_DISCONNECTED
	.comm	_SCIF_CLIENT_RCVD,4,2           ; @SCIF_CLIENT_RCVD
	.comm	_SCIF_ENDPT_QP_SIZE,4,2         ; @SCIF_ENDPT_QP_SIZE
	.comm	_ECONNRESET,4,2                 ; @ECONNRESET
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.no_dead_strip	__scif_recv
.subsections_via_symbols
