	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_msg_post_wait_mem          ## -- Begin function i2o_msg_post_wait_mem
	.p2align	4, 0x90
_i2o_msg_post_wait_mem:                 ## @i2o_msg_post_wait_mem
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DECLARE_WAIT_QUEUE_HEAD_ONSTACK
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_i2o_exec_wait_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	cmpl	$-1, _i2o_msg_post_wait_mem.tcntxt(%rip)
	jne	LBB0_4
## %bb.3:
	movl	$-2147483648, _i2o_msg_post_wait_mem.tcntxt(%rip) ## imm = 0x80000000
LBB0_4:
	movq	%r12, %r15
	testq	%r12, %r12
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movq	%rax, 40(%rbx)
LBB0_6:
	movq	_i2o_exec_driver@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r13)
	movl	_i2o_msg_post_wait_mem.tcntxt(%rip), %edi
	leal	1(%rdi), %eax
	movl	%eax, _i2o_msg_post_wait_mem.tcntxt(%rip)
	movl	%edi, 36(%rbx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le32
	movq	%rax, (%r13)
	movq	_wq@GOTPCREL(%rip), %r12
	movq	%r12, 24(%rbx)
	leaq	32(%rbx), %rdi
	movq	_i2o_exec_wait_list@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_i2o_msg_post
	movl	(%r12), %edi
	movq	16(%rbx), %rsi
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	imulq	(%rax), %rdx
	callq	_wait_event_interruptible_timeout
	movq	%rbx, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 24(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	sarl	$24, %r14d
	jmp	LBB0_11
LBB0_1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_i2o_msg_nop
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_8:
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	$0, (%r15)
LBB0_10:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	je	LBB0_13
## %bb.12:
	movl	(%rbx), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_i2o_flush_reply
	movq	%rbx, %rdi
	callq	_i2o_exec_wait_free
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wq,4,2                         ## @wq
	.section	__DATA,__data
	.p2align	2                               ## @i2o_msg_post_wait_mem.tcntxt
_i2o_msg_post_wait_mem.tcntxt:
	.long	2147483648                      ## 0x80000000

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_i2o_exec_driver,4,2            ## @i2o_exec_driver
	.comm	_i2o_exec_wait_list,4,2         ## @i2o_exec_wait_list
	.comm	_HZ,8,3                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_msg_post_wait_mem          ; -- Begin function i2o_msg_post_wait_mem
	.p2align	2
_i2o_msg_post_wait_mem:                 ; @i2o_msg_post_wait_mem
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _wq@GOTPAGE
Lloh1:
	ldr	x24, [x24, _wq@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_DECLARE_WAIT_QUEUE_HEAD_ONSTACK
	bl	_i2o_exec_wait_alloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	adrp	x25, _i2o_msg_post_wait_mem.tcntxt@PAGE
	ldr	w8, [x25, _i2o_msg_post_wait_mem.tcntxt@PAGEOFF]
	cmn	w8, #1
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #-2147483648
	str	w8, [x25, _i2o_msg_post_wait_mem.tcntxt@PAGEOFF]
LBB0_3:
	cbz	x21, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	str	x8, [x20, #40]
LBB0_5:
Lloh2:
	adrp	x8, _i2o_exec_driver@GOTPAGE
Lloh3:
	ldr	x8, [x8, _i2o_exec_driver@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x23, #8]
	ldr	w0, [x25, _i2o_msg_post_wait_mem.tcntxt@PAGEOFF]
	add	w8, w0, #1
	str	w8, [x25, _i2o_msg_post_wait_mem.tcntxt@PAGEOFF]
	str	w0, [x20, #36]
	bl	_cpu_to_le32
	str	x0, [x23]
	str	x24, [x20, #24]
	add	x0, x20, #32
Lloh5:
	adrp	x1, _i2o_exec_wait_list@GOTPAGE
Lloh6:
	ldr	x1, [x1, _i2o_exec_wait_list@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x19
	mov	x1, x23
	bl	_i2o_msg_post
	ldr	w0, [x24]
	ldr	x1, [x20, #16]
Lloh7:
	adrp	x8, _HZ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	mul	x2, x8, x22
	bl	_wait_event_interruptible_timeout
	add	x22, x20, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	str	xzr, [x20, #24]
	ldr	x8, [x20, #16]
Lloh10:
	adrp	x23, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x23, [x23, _ETIMEDOUT@GOTPAGEOFF]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	asr	w21, w0, #24
	b	LBB0_11
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	bl	_i2o_msg_nop
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_8:
	cbz	x21, LBB0_10
; %bb.9:
	str	xzr, [x21]
LBB0_10:
	ldr	w8, [x23]
	neg	w21, w8
LBB0_11:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w8, [x23]
	cmn	w21, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_i2o_flush_reply
	mov	x0, x20
	bl	_i2o_exec_wait_free
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_wq,4,2                         ; @wq
	.section	__DATA,__data
	.p2align	2                               ; @i2o_msg_post_wait_mem.tcntxt
_i2o_msg_post_wait_mem.tcntxt:
	.long	2147483648                      ; 0x80000000

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_i2o_exec_driver,4,2            ; @i2o_exec_driver
	.comm	_i2o_exec_wait_list,4,2         ; @i2o_exec_wait_list
	.comm	_HZ,8,3                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
