	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ma901radio_set_freq
_ma901radio_set_freq:                   ## @ma901radio_set_freq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	%esi, %eax
	sarl	$5, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$35, %rax
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	addl	$768, %eax                      ## imm = 0x300
	movq	(%rdi), %rcx
	movl	$10, (%rcx)
	movq	_MA901_RADIO_SET_FREQ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 4(%rcx)
	movzbl	%ah, %eax
	subl	$-128, %eax
	movl	%eax, 8(%rcx)
	movzbl	%dl, %eax
	movl	%eax, 12(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rcx)
	movl	12(%rdi), %ebx
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_BUFFER_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_USB_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$9, %edx
	movl	$33, %ecx
	movl	$768, %r8d                      ## imm = 0x300
	xorl	%r9d, %r9d
	pushq	%r11
	pushq	%r10
	pushq	(%r12)
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r14d, 8(%r12)
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %r15d
LBB0_3:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA901_RADIO_SET_FREQ,4,2       ## @MA901_RADIO_SET_FREQ
	.comm	_BUFFER_LENGTH,4,2              ## @BUFFER_LENGTH
	.comm	_USB_TIMEOUT,4,2                ## @USB_TIMEOUT
	.no_dead_strip	_ma901radio_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ma901radio_set_freq
_ma901radio_set_freq:                   ; @ma901radio_set_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	asr	w8, w1, #5
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #35
	add	w8, w8, w9
	add	w9, w8, #768
	ldr	x10, [x0]
	mov	w11, #10
	str	w11, [x10]
Lloh0:
	adrp	x11, _MA901_RADIO_SET_FREQ@GOTPAGE
Lloh1:
	ldr	x11, [x11, _MA901_RADIO_SET_FREQ@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	ubfx	w9, w9, #8, #8
	add	w9, w9, #128
	stp	w11, w9, [x10, #4]
	and	w8, w8, #0xff
	str	w8, [x10, #12]
	stp	xzr, xzr, [x10, #16]
	ldr	w21, [x0, #12]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	ldr	x6, [x20]
Lloh3:
	adrp	x8, _BUFFER_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFFER_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
Lloh6:
	adrp	x8, _USB_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #9
	mov	w3, #33
	mov	w4, #768
	mov	w5, #0
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w0, #0
	str	w19, [x20, #8]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MA901_RADIO_SET_FREQ,4,2       ; @MA901_RADIO_SET_FREQ
	.comm	_BUFFER_LENGTH,4,2              ; @BUFFER_LENGTH
	.comm	_USB_TIMEOUT,4,2                ; @USB_TIMEOUT
	.no_dead_strip	_ma901radio_set_freq
.subsections_via_symbols
