	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp8psk_usb_in_op
_gp8psk_usb_in_op:                      ## @gp8psk_usb_in_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	cmpl	$5, %r9d
	jb	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_2:
	movl	%r9d, %r13d
	movq	%r8, %r12
	movq	%rdi, %r14
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rdi), %r15
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r13d, %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, %r12d
	ja	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r14), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	(%r15), %r10d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	pushq	$2000                           ## imm = 0x7D0
	pushq	%r13
	pushq	%r10
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_deb_info
	incl	%r12d
	testl	%ebx, %ebx
	jns	LBB0_4
	jmp	LBB0_8
LBB0_7:
	cmpl	%r13d, %ebx
	jne	LBB0_8
## %bb.9:
	movl	(%r15), %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_debug_dump
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading number %d (ret: %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"usb in %d operation failed."

L_.str.2:                               ## @.str.2
	.asciz	"in: req. %x, val: %x, ind: %x, buffer: "

	.no_dead_strip	_gp8psk_usb_in_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_in_op
_gp8psk_usb_in_op:                      ; @gp8psk_usb_in_op
	.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
	cmp	w5, #5
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_14
LBB0_2:
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x26, [x0, #8]
	bl	_mutex_lock_interruptible
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.3:
	cbz	w20, LBB0_9
; %bb.4:
	ldr	w25, [x19, #4]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x27, _USB_TYPE_VENDOR@GOTPAGE
Lloh4:
	ldr	x27, [x27, _USB_TYPE_VENDOR@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh5:
	adrp	x28, _USB_DIR_IN@GOTPAGE
Lloh6:
	ldr	x28, [x28, _USB_DIR_IN@GOTPAGEOFF]
	ldr	w9, [x28]
	orr	w3, w9, w8
	ldr	w6, [x26]
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x25
	mov	x2, x24
	mov	x4, x23
	mov	x5, x22
	mov	x7, x20
	bl	_usb_control_msg
	mov	x25, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	mov	x2, x25
	bl	_deb_info
	tbnz	w25, #31, LBB0_12
; %bb.5:
	cmp	w25, w20
	b.eq	LBB0_10
; %bb.6:
	ldr	w25, [x19, #4]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w3, w9, w8
	ldr	w6, [x26]
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x25
	mov	x2, x24
	mov	x4, x23
	mov	x5, x22
	mov	x7, x20
	bl	_usb_control_msg
	mov	x25, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
	mov	x2, x25
	bl	_deb_info
	tbnz	w25, #31, LBB0_12
; %bb.7:
	cmp	w25, w20
	b.eq	LBB0_10
; %bb.8:
	ldr	w25, [x19, #4]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w3, w9, w8
	ldr	w6, [x26]
	mov	w8, #2000
	str	w8, [sp]
	mov	x0, x25
	mov	x2, x24
	mov	x4, x23
	mov	x5, x22
	mov	x7, x20
	bl	_usb_control_msg
	mov	x25, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #2
	mov	x2, x25
	bl	_deb_info
	tbz	w25, #31, LBB0_10
	b	LBB0_12
LBB0_9:
	mov	w25, #0
LBB0_10:
	cmp	w25, w20
	b.ne	LBB0_12
; %bb.11:
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, x20
	bl	_memcpy
	mov	w25, #0
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	bl	_warn
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_13:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	bl	_deb_xfer
Lloh20:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh21:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x20
	bl	_debug_dump
	mov	x0, x19
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x25
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading number %d (ret: %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"usb in %d operation failed."

l_.str.2:                               ; @.str.2
	.asciz	"in: req. %x, val: %x, ind: %x, buffer: "

	.no_dead_strip	_gp8psk_usb_in_op
.subsections_via_symbols
