	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avc_write
_avc_write:                             ## @avc_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, (%rdi)
	movl	$6, %r12d
	movq	_FCP_COMMAND_REGISTER@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_avc_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r14), %esi
	movl	16(%r14), %edi
	callq	_debug_fcp
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	movl	12(%r14), %ecx
	movl	16(%r14), %edx
	movq	%r14, %rdi
	callq	_fdtv_write
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %r15d
	movl	8(%r14), %ebx
	movl	$200, %edi
	callq	_msecs_to_jiffies
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%r12d
	jne	LBB0_2
## %bb.8:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_avc_debug,4,2                  ## @avc_debug
	.comm	_FCP_COMMAND_REGISTER,4,2       ## @FCP_COMMAND_REGISTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FCP command write failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"FCP response timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_avc_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avc_write
_avc_write:                             ; @avc_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	str	wzr, [x0]
	mov	w22, #6
Lloh0:
	adrp	x23, _avc_debug@GOTPAGE
Lloh1:
	ldr	x23, [x23, _avc_debug@GOTPAGEOFF]
Lloh2:
	adrp	x24, _FCP_COMMAND_REGISTER@GOTPAGE
Lloh3:
	ldr	x24, [x24, _FCP_COMMAND_REGISTER@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w1, w0, [x19, #12]
	bl	_debug_fcp
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x24]
	ldp	w3, w2, [x19, #12]
	mov	x0, x19
	bl	_fdtv_write
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w20, [x19, #8]
	ldr	w21, [x19]
	mov	w0, #200
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wait_event_timeout
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_1
; %bb.6:
	ldr	w0, [x19, #4]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_7:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_avc_debug,4,2                  ; @avc_debug
	.comm	_FCP_COMMAND_REGISTER,4,2       ; @FCP_COMMAND_REGISTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FCP command write failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"FCP response timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_avc_write
.subsections_via_symbols
