	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asix_write_cmd_async
_asix_write_cmd_async:                  ## @asix_write_cmd_async
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r13d
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	callq	_devdbg
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	%r15d, 32(%rbx)
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%rbx)
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %r14d
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_asix_async_cmd_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	%r13d, %r9d
	pushq	%rbx
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_deverr                         ## TAILCALL
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_deverr
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_deverr
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r12, %rdi
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_free_urb                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"asix_write_cmd_async() cmd=0x%02x value=0x%04x index=0x%04x size=%d"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"Error allocating URB in write_cmd_async!"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate memory for control request"

	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_asix_async_cmd_callback,4,2    ## @asix_async_cmd_callback
L_.str.3:                               ## @.str.3
	.asciz	"Error submitting the control message: status=%d"

	.no_dead_strip	_asix_write_cmd_async
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asix_write_cmd_async
_asix_write_cmd_async:                  ; @asix_write_cmd_async
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x5
	mov	x21, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	mov	x5, x21
	bl	_devdbg
Lloh2:
	adrp	x27, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w1, [x27]
	mov	w0, #40
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x23, x0
Lloh4:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0]
	str	w26, [x0, #32]
	mov	x0, x25
	bl	_cpu_to_le16
	str	x0, [x23, #24]
	mov	x0, x24
	bl	_cpu_to_le16
	str	x0, [x23, #16]
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [x23, #8]
	ldr	w24, [x19]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
Lloh13:
	adrp	x8, _asix_async_cmd_callback@GOTPAGE
Lloh14:
	ldr	x8, [x8, _asix_async_cmd_callback@GOTPAGEOFF]
Lloh15:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x7, x23
	bl	_usb_fill_control_urb
	ldr	w1, [x27]
	mov	x0, x20
	bl	_usb_submit_urb
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_deverr
LBB0_5:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_deverr
	b	LBB0_7
LBB0_6:
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_deverr
	mov	x0, x23
	bl	_kfree
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_usb_free_urb
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"asix_write_cmd_async() cmd=0x%02x value=0x%04x index=0x%04x size=%d"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"Error allocating URB in write_cmd_async!"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate memory for control request"

	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_asix_async_cmd_callback,4,2    ; @asix_async_cmd_callback
l_.str.3:                               ; @.str.3
	.asciz	"Error submitting the control message: status=%d"

	.no_dead_strip	_asix_write_cmd_async
.subsections_via_symbols
