	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adb_iop_listen
_adb_iop_listen:                        ## @adb_iop_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	callq	_local_irq_save
	movq	_current_req@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	4(%rbx), %edx
	movq	_ADB_IOP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_4
## %bb.1:
	movq	_ADB_IOP_AUTOPOLL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movq	$0, 4(%rcx)
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.2:
	movq	_adb_iop_state@GOTPCREL(%rip), %rax
	movq	_idle@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, (%rax)
	je	LBB0_9
## %bb.3:
	callq	_adb_iop_end_req
	jmp	LBB0_9
LBB0_4:
	movq	_adb_iop_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_awaiting_reply@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	_ADB_IOP_EXPLICIT@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %edx
	incl	%edx
	movl	%edx, (%rdi)
	movq	8(%rdi), %rdi
	addq	$8, %rbx
	movq	%rbx, %rsi
	callq	_memcpy
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %esi
	addq	$8, %rbx
	incl	%esi
	movq	_ADB_IOP_AUTOPOLL@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_adb_input
LBB0_8:
	movq	(%r14), %rdi
	movq	8(%r14), %rsi
	movq	_IOP_MSG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
LBB0_9:
	movq	%r14, %rdi
	callq	_iop_complete_message
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_local_irq_restore              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_current_req,8,3                ## @current_req
	.comm	_ADB_IOP_TIMEOUT,4,2            ## @ADB_IOP_TIMEOUT
	.comm	_ADB_IOP_AUTOPOLL,4,2           ## @ADB_IOP_AUTOPOLL
	.comm	_adb_iop_state,8,3              ## @adb_iop_state
	.comm	_idle,8,3                       ## @idle
	.comm	_awaiting_reply,8,3             ## @awaiting_reply
	.comm	_ADB_IOP_EXPLICIT,4,2           ## @ADB_IOP_EXPLICIT
	.comm	_IOP_MSG_LEN,4,2                ## @IOP_MSG_LEN
	.no_dead_strip	_adb_iop_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adb_iop_listen
_adb_iop_listen:                        ; @adb_iop_listen
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	bl	_local_irq_save
Lloh0:
	adrp	x8, _current_req@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current_req@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x9, _ADB_IOP_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADB_IOP_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _ADB_IOP_AUTOPOLL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADB_IOP_AUTOPOLL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w8, w9
	ldr	x9, [x19]
	stp	wzr, wzr, [x9, #4]
	str	w8, [x9]
	cbz	x0, LBB0_9
; %bb.2:
Lloh9:
	adrp	x8, _adb_iop_state@GOTPAGE
Lloh10:
	ldr	x8, [x8, _adb_iop_state@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _idle@GOTPAGE
Lloh13:
	ldr	x9, [x9, _idle@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x9]
	cmp	x8, x1
	b.eq	LBB0_9
; %bb.3:
	bl	_adb_iop_end_req
	b	LBB0_9
LBB0_4:
Lloh15:
	adrp	x9, _adb_iop_state@GOTPAGE
Lloh16:
	ldr	x9, [x9, _adb_iop_state@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _awaiting_reply@GOTPAGE
Lloh19:
	ldr	x10, [x10, _awaiting_reply@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.5:
Lloh21:
	adrp	x9, _ADB_IOP_EXPLICIT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ADB_IOP_EXPLICIT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x20], #8
	add	w2, w8, #1
	str	w2, [x0]
	ldr	x0, [x0, #8]
	mov	x1, x20
	bl	_memcpy
	b	LBB0_8
LBB0_7:
	ldr	w9, [x20], #8
	add	w1, w9, #1
Lloh24:
	adrp	x9, _ADB_IOP_AUTOPOLL@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ADB_IOP_AUTOPOLL@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	and	w2, w9, w8
	mov	x0, x20
	bl	_adb_input
LBB0_8:
	ldp	x0, x1, [x19]
Lloh27:
	adrp	x8, _IOP_MSG_LEN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IOP_MSG_LEN@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	bl	_memcpy
LBB0_9:
	mov	x0, x19
	bl	_iop_complete_message
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_local_irq_restore
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_current_req,8,3                ; @current_req
	.comm	_ADB_IOP_TIMEOUT,4,2            ; @ADB_IOP_TIMEOUT
	.comm	_ADB_IOP_AUTOPOLL,4,2           ; @ADB_IOP_AUTOPOLL
	.comm	_adb_iop_state,8,3              ; @adb_iop_state
	.comm	_idle,8,3                       ; @idle
	.comm	_awaiting_reply,8,3             ; @awaiting_reply
	.comm	_ADB_IOP_EXPLICIT,4,2           ; @ADB_IOP_EXPLICIT
	.comm	_IOP_MSG_LEN,4,2                ; @IOP_MSG_LEN
	.no_dead_strip	_adb_iop_listen
.subsections_via_symbols
