	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi2500_ctrl_msg
_msi2500_ctrl_msg:                      ## @msi2500_ctrl_msg
	.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	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movzwl	%r14w, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	shrl	$16, %r14d
	movl	(%rdi), %edi
	subq	$8, %rsp
	movl	%r13d, %edx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	callq	_msi2500_dbg_usb_control_msg
	addq	$16, %rsp
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%r14d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dev_err
LBB0_2:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed %d, cmd %02x, data %04x\n"

	.no_dead_strip	_msi2500_ctrl_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msi2500_ctrl_msg
_msi2500_ctrl_msg:                      ; @msi2500_ctrl_msg
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w22, w9, w8
	and	w23, w2, #0xffff
	lsr	w24, w2, #16
	ldr	w0, [x0]
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	mov	x5, #0
	mov	w6, #0
	bl	_msi2500_dbg_usb_control_msg
	ldr	w25, [x21, #4]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x25
	mov	x2, x20
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	mov	x22, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x20
	mov	x4, x19
	bl	_dev_err
LBB0_2:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed %d, cmd %02x, data %04x\n"

	.no_dead_strip	_msi2500_ctrl_msg
.subsections_via_symbols
