	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hackrf_ctrl_msg
_hackrf_ctrl_msg:                       ## @hackrf_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leal	-128(%r12), %eax
	cmpl	$9, %eax
	ja	LBB0_3
## %bb.1:
	movl	%edx, %r14d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	$151, %ecx
	btl	%eax, %ecx
	jae	LBB0_2
## %bb.4:
	movl	12(%rbx), %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movl	%eax, %r15d
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %r13d
	orl	%eax, %r13d
	testl	%r13d, %eax
	jne	LBB0_7
	jmp	LBB0_6
LBB0_2:
	movl	12(%rbx), %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movl	%eax, %r15d
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r13d, %eax
	jne	LBB0_7
LBB0_6:
	movq	(%rbx), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
LBB0_7:
	movl	12(%rbx), %edi
	subq	$8, %rsp
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r15d
	movl	%r14d, %r8d
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	pushq	%r13
	pushq	(%rbx)
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	8(%rbx), %edi
	movq	(%rbx), %r9
	subq	$8, %rsp
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	movl	%eax, %r14d
	pushq	%r13
	callq	_hackrf_dbg_usb_control_msg
	addq	$16, %rsp
	testl	%r14d, %r14d
	js	LBB0_8
## %bb.9:
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	(%rbx), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_11
LBB0_8:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown command %02x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"usb_control_msg() failed %d request %02x\n"

	.no_dead_strip	_hackrf_ctrl_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hackrf_ctrl_msg
_hackrf_ctrl_msg:                       ; @hackrf_ctrl_msg
	.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	x20, x1
	mov	x22, x0
	sub	w8, w1, #128
	cmp	w8, #9
	b.hi	LBB0_11
; %bb.1:
	mov	x19, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #151
Lloh0:
	adrp	x27, _USB_DIR_IN@GOTPAGE
Lloh1:
	ldr	x27, [x27, _USB_DIR_IN@GOTPAGEOFF]
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x22, #12]
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x26, x0
Lloh2:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	ldr	w8, [x27]
	orr	w25, w8, w9
	tst	w8, w25
	b.ne	LBB0_5
	b	LBB0_4
LBB0_3:
	ldr	w0, [x22, #12]
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x26, x0
Lloh5:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w25, w9, w8
	ldr	w8, [x27]
	tst	w8, w25
	b.ne	LBB0_5
LBB0_4:
	ldr	x0, [x22]
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
LBB0_5:
	ldr	w0, [x22, #12]
	ldr	x6, [x22]
	mov	w8, #1000
	str	w8, [sp]
	mov	x1, x26
	mov	x2, x20
	mov	x3, x25
	mov	x4, x24
	mov	x5, x23
	mov	x7, x19
	bl	_usb_control_msg
	mov	x26, x0
	ldr	w0, [x22, #8]
	ldr	x5, [x22]
	mov	x1, x20
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x6, x19
	bl	_hackrf_dbg_usb_control_msg
	tbnz	w26, #31, LBB0_9
; %bb.6:
	ldr	w8, [x27]
	tst	w8, w25
	b.eq	LBB0_8
; %bb.7:
	ldr	x1, [x22]
	mov	x0, x21
	mov	x2, x19
	bl	_memcpy
LBB0_8:
	mov	w26, #0
	b	LBB0_10
LBB0_9:
	ldr	w0, [x22, #8]
	str	x20, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x26
	bl	_dev_err
LBB0_10:
	mov	x0, x26
	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_11:
	ldr	w0, [x22, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown command %02x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"usb_control_msg() failed %d request %02x\n"

	.no_dead_strip	_hackrf_ctrl_msg
.subsections_via_symbols
