	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp8psk_usb_out_op
_gp8psk_usb_out_op:                     ## @gp8psk_usb_out_op
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movq	%r8, %r15
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_debug_dump
	cmpl	$5, %r14d
	jb	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %edi
	movq	%r14, %rsi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %r12d
	xorl	%r15d, %r15d
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rdx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	(%r13), %r10d
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	pushq	$2000                           ## imm = 0x7D0
	pushq	%r14
	pushq	%r10
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	%r14d, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_6:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out: req. %x, val: %x, ind: %x, buffer: "

	.comm	_EIO,4,2                        ## @EIO
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
L_.str.1:                               ## @.str.1
	.asciz	"usb out operation failed."

	.no_dead_strip	_gp8psk_usb_out_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp8psk_usb_out_op
_gp8psk_usb_out_op:                     ; @gp8psk_usb_out_op
	.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	x20, x5
	mov	x24, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x26, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_xfer
Lloh2:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh3:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	mov	x0, x24
	mov	x1, x20
	bl	_debug_dump
	cmp	w20, #5
	b.lo	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x25, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x26]
	mov	x1, x24
	mov	x2, x20
	bl	_memcpy
	ldr	w24, [x19, #4]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh7:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w3, w9, w8
	ldr	w6, [x26]
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x24
	mov	x2, x23
	mov	x4, x22
	mov	x5, x21
	mov	x7, x20
	bl	_usb_control_msg
	cmp	w0, w20
	b.eq	LBB0_5
; %bb.4:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x25
	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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out: req. %x, val: %x, ind: %x, buffer: "

	.comm	_EIO,4,2                        ; @EIO
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
l_.str.1:                               ; @.str.1
	.asciz	"usb out operation failed."

	.no_dead_strip	_gp8psk_usb_out_op
.subsections_via_symbols
