	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atwrite_submit
_atwrite_submit:                        ## @atwrite_submit
	.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
	movl	%edx, %r12d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_DEBUG_USBREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_gig_dbg
	movq	_BS_ATWRPEND@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_update_basstate
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	movq	_OUT_VENDOR_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	32(%r14), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, 60(%r14)
	movq	_HD_WRITE_ATMESSAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r14)
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movl	%eax, 32(%r14)
	movl	24(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	64(%r14), %r13d
	xorl	%r15d, %r15d
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_write_command_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	%r12d, %r9d
	pushq	%rbx
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movl	24(%r14), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_BS_ATWRPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_update_basstate
	movl	(%rbx), %ebx
	movl	%r12d, %edi
	callq	_get_usb_rcmsg
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %r15d
	jmp	LBB0_6
LBB0_4:
	movq	_BS_ATTIMER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_BS_ATREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_update_basstate
	testl	%eax, (%r12)
	jne	LBB0_6
## %bb.5:
	movq	_DEBUG_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ATRDY_TIMEOUT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_gig_dbg
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%r12), %ecx
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 16(%r14)
	movq	%rbx, (%r14)
	movq	_atrdy_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_add_timer
LBB0_6:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_USBREQ,4,2               ## @DEBUG_USBREQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-------> HD_WRITE_ATMESSAGE (%d)"

	.comm	_BS_ATWRPEND,4,2                ## @BS_ATWRPEND
L_.str.1:                               ## @.str.1
	.asciz	"could not submit HD_WRITE_ATMESSAGE: URB busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_OUT_VENDOR_REQ,4,2             ## @OUT_VENDOR_REQ
	.comm	_HD_WRITE_ATMESSAGE,4,2         ## @HD_WRITE_ATMESSAGE
	.comm	_write_command_callback,4,2     ## @write_command_callback
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.2:                               ## @.str.2
	.asciz	"could not submit HD_WRITE_ATMESSAGE: %s\n"

	.comm	_BS_ATTIMER,4,2                 ## @BS_ATTIMER
	.comm	_BS_ATREADY,4,2                 ## @BS_ATREADY
	.comm	_DEBUG_OUTPUT,4,2               ## @DEBUG_OUTPUT
L_.str.3:                               ## @.str.3
	.asciz	"setting ATREADY timeout of %d/10 secs"

	.comm	_ATRDY_TIMEOUT,4,2              ## @ATRDY_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_atrdy_timeout,4,2              ## @atrdy_timeout
	.no_dead_strip	_atwrite_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atwrite_submit
_atwrite_submit:                        ; @atwrite_submit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _DEBUG_USBREQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_USBREQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gig_dbg
Lloh5:
	adrp	x26, _BS_ATWRPEND@GOTPAGE
Lloh6:
	ldr	x26, [x26, _BS_ATWRPEND@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #0
	bl	_update_basstate
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_2:
Lloh12:
	adrp	x8, _OUT_VENDOR_REQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OUT_VENDOR_REQ@GOTPAGEOFF]
Lloh14:
	adrp	x9, _HD_WRITE_ATMESSAGE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HD_WRITE_ATMESSAGE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #56]
	stp	xzr, xzr, [x20, #40]
	mov	x0, x21
	bl	_cpu_to_le16
	mov	x23, x20
	str	w0, [x23, #32]!
	ldur	w24, [x23, #-8]
	ldr	w25, [x23, #32]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
Lloh18:
	adrp	x8, _write_command_callback@GOTPAGE
Lloh19:
	ldr	x8, [x8, _write_command_callback@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
	mov	x0, x24
	mov	x1, x25
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x7, x19
	bl	_usb_fill_control_urb
	ldur	w0, [x23, #-8]
Lloh21:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	mov	x21, x0
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x26]
	mov	x0, x20
	mov	w1, #0
	bl	_update_basstate
	ldr	w19, [x19]
	mov	x0, x21
	bl	_get_usb_rcmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_4:
Lloh26:
	adrp	x21, _BS_ATTIMER@GOTPAGE
Lloh27:
	ldr	x21, [x21, _BS_ATTIMER@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh28:
	adrp	x8, _BS_ATREADY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BS_ATREADY@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_update_basstate
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:
Lloh31:
	adrp	x8, _DEBUG_OUTPUT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DEBUG_OUTPUT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x21, _ATRDY_TIMEOUT@GOTPAGE
Lloh35:
	ldr	x21, [x21, _ATRDY_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_gig_dbg
Lloh38:
	adrp	x8, _jiffies@GOTPAGE
Lloh39:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	ldr	w9, [x21]
Lloh41:
	adrp	x10, _HZ@GOTPAGE
Lloh42:
	ldr	x10, [x10, _HZ@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	mul	w9, w10, w9
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #34
	add	w9, w9, w10
	add	x8, x8, w9, sxtw
	str	x8, [x20, #16]
	str	x19, [x20]
Lloh44:
	adrp	x8, _atrdy_timeout@GOTPAGE
Lloh45:
	ldr	x8, [x8, _atrdy_timeout@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_add_timer
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_USBREQ,4,2               ; @DEBUG_USBREQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-------> HD_WRITE_ATMESSAGE (%d)"

	.comm	_BS_ATWRPEND,4,2                ; @BS_ATWRPEND
l_.str.1:                               ; @.str.1
	.asciz	"could not submit HD_WRITE_ATMESSAGE: URB busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_OUT_VENDOR_REQ,4,2             ; @OUT_VENDOR_REQ
	.comm	_HD_WRITE_ATMESSAGE,4,2         ; @HD_WRITE_ATMESSAGE
	.comm	_write_command_callback,4,2     ; @write_command_callback
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.2:                               ; @.str.2
	.asciz	"could not submit HD_WRITE_ATMESSAGE: %s\n"

	.comm	_BS_ATTIMER,4,2                 ; @BS_ATTIMER
	.comm	_BS_ATREADY,4,2                 ; @BS_ATREADY
	.comm	_DEBUG_OUTPUT,4,2               ; @DEBUG_OUTPUT
l_.str.3:                               ; @.str.3
	.asciz	"setting ATREADY timeout of %d/10 secs"

	.comm	_ATRDY_TIMEOUT,4,2              ; @ATRDY_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_atrdy_timeout,4,2              ; @atrdy_timeout
	.no_dead_strip	_atwrite_submit
.subsections_via_symbols
