	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm_write_async_helper
_dm_write_async_helper:                 ## @dm_write_async_helper
	.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	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %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)
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.6:
	movq	_DM_WRITE_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	leaq	L_.str(%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.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_deverr
	jmp	LBB0_3
LBB0_5:
	movq	_DM_WRITE_REGS@GOTPCREL(%rip), %rax
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	callq	_cpu_to_le16
	movq	%rax, 24(%rbx)
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %r14d
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_dm_write_async_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	%r12d, %r9d
	pushq	%rbx
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_deverr
	movq	%rbx, %rdi
	callq	_kfree
LBB0_3:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_free_urb                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error allocating URB in dm_write_async_helper!"

L_.str.1:                               ## @.str.1
	.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	_DM_WRITE_REGS,4,2              ## @DM_WRITE_REGS
	.comm	_DM_WRITE_REG,4,2               ## @DM_WRITE_REG
	.comm	_dm_write_async_callback,4,2    ## @dm_write_async_callback
L_.str.2:                               ## @.str.2
	.asciz	"Error submitting the control message: status=%d"

	.no_dead_strip	_dm_write_async_helper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm_write_async_helper
_dm_write_async_helper:                 ; @dm_write_async_helper
	.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	x23, x4
	mov	x22, x3
	mov	x25, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x26, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w1, [x26]
	mov	w0, #40
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
Lloh2:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _USB_RECIP_DEVICE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _USB_RECIP_DEVICE@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh10:
	ldr	w9, [x10]
	orr	w8, w8, w9
	str	w8, [x0]
Lloh11:
	adrp	x8, _DM_WRITE_REGS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DM_WRITE_REGS@GOTPAGEOFF]
Lloh13:
	adrp	x9, _DM_WRITE_REG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DM_WRITE_REG@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x0, #32]
	mov	x0, x25
	bl	_cpu_to_le16
	str	x0, [x21, #24]
	mov	x0, x24
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	mov	x0, x22
	bl	_cpu_to_le16
	str	x0, [x21, #8]
	ldr	w24, [x20]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
Lloh15:
	adrp	x8, _dm_write_async_callback@GOTPAGE
Lloh16:
	ldr	x8, [x8, _dm_write_async_callback@GOTPAGEOFF]
Lloh17:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x24
	mov	x3, x21
	mov	x4, x23
	mov	x5, x22
	mov	x7, x21
	bl	_usb_fill_control_urb
	ldr	w1, [x26]
	mov	x0, x19
	bl	_usb_submit_urb
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	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
LBB0_4:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	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
	b	_deverr
LBB0_5:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_deverr
	b	LBB0_7
LBB0_6:
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_deverr
	mov	x0, x21
	bl	_kfree
LBB0_7:
	mov	x0, x19
	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
	b	_usb_free_urb
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error allocating URB in dm_write_async_helper!"

l_.str.1:                               ; @.str.1
	.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	_DM_WRITE_REGS,4,2              ; @DM_WRITE_REGS
	.comm	_DM_WRITE_REG,4,2               ; @DM_WRITE_REG
	.comm	_dm_write_async_callback,4,2    ; @dm_write_async_callback
l_.str.2:                               ; @.str.2
	.asciz	"Error submitting the control message: status=%d"

	.no_dead_strip	_dm_write_async_helper
.subsections_via_symbols
