	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macii_write
_macii_write:                           ## @macii_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$2, %eax
	jge	LBB0_1
LBB0_3:
	movl	$1, 16(%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_1:
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_ADB_PACKET@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.2:
	cmpl	$16, %eax
	jae	LBB0_3
## %bb.4:
	movl	$0, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	$0, 40(%rbx)
	callq	_local_irq_save
	movq	_current_req@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_last_req@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, 24(%rcx)
	movq	%rbx, (%rax)
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, (%rax)
	movq	_last_req@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_macii_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_idle@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_macii_start
LBB0_8:
	callq	_local_irq_restore
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADB_PACKET,8,3                 ## @ADB_PACKET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_current_req,8,3                ## @current_req
	.comm	_last_req,8,3                   ## @last_req
	.comm	_macii_state,8,3                ## @macii_state
	.comm	_idle,8,3                       ## @idle
	.no_dead_strip	_macii_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macii_write
_macii_write:                           ; @macii_write
	.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	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
Lloh0:
	adrp	x10, _ADB_PACKET@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ADB_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	ccmp	w8, #16, #2, eq
	b.lo	LBB0_3
LBB0_2:
	mov	w8, #1
	str	w8, [x19, #16]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	str	wzr, [x19, #16]
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #24]
	bl	_local_irq_save
Lloh6:
	adrp	x8, _current_req@GOTPAGE
Lloh7:
	ldr	x8, [x8, _current_req@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _last_req@GOTPAGE
Lloh9:
	ldr	x8, [x8, _last_req@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x19, [x9, #24]
	str	x19, [x8]
	b	LBB0_7
LBB0_5:
	str	x19, [x8]
Lloh10:
	adrp	x8, _last_req@GOTPAGE
Lloh11:
	ldr	x8, [x8, _last_req@GOTPAGEOFF]
Lloh12:
	adrp	x9, _macii_state@GOTPAGE
Lloh13:
	ldr	x9, [x9, _macii_state@GOTPAGEOFF]
Lloh14:
	str	x19, [x8]
Lloh15:
	ldr	x8, [x9]
Lloh16:
	adrp	x9, _idle@GOTPAGE
Lloh17:
	ldr	x9, [x9, _idle@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	bl	_macii_start
LBB0_7:
	bl	_local_irq_restore
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ADB_PACKET,8,3                 ; @ADB_PACKET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_current_req,8,3                ; @current_req
	.comm	_last_req,8,3                   ; @last_req
	.comm	_macii_state,8,3                ; @macii_state
	.comm	_idle,8,3                       ; @idle
	.no_dead_strip	_macii_write
.subsections_via_symbols
