	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsusb1_setmode
_smsusb1_setmode:                       ## @smsusb1_setmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	_MSG_SW_RELOAD_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -20(%rbp)
	movq	_HIF_TASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	$20, -12(%rbp)
	movq	_DEVICE_MODE_DVBT@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jg	LBB0_2
## %bb.1:
	movq	_DEVICE_MODE_DVBT_BDA@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.3:
	leaq	-24(%rbp), %rsi
	movl	$20, %edx
	callq	_smsusb_sendrequest
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_SW_RELOAD_REQ,4,2          ## @MSG_SW_RELOAD_REQ
	.comm	_HIF_TASK,4,2                   ## @HIF_TASK
	.comm	_DEVICE_MODE_DVBT,4,2           ## @DEVICE_MODE_DVBT
	.comm	_DEVICE_MODE_DVBT_BDA,4,2       ## @DEVICE_MODE_DVBT_BDA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid firmware id specified %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_smsusb1_setmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function smsusb1_setmode
lCPI0_0:
	.long	20                              ; 0x14
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_smsusb1_setmode:                       ; @smsusb1_setmode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _MSG_SW_RELOAD_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_SW_RELOAD_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, wzr, [sp, #8]
Lloh3:
	adrp	x8, _HIF_TASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HIF_TASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [sp, #20]
Lloh8:
	adrp	x8, _DEVICE_MODE_DVBT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DEVICE_MODE_DVBT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _DEVICE_MODE_DVBT_BDA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DEVICE_MODE_DVBT_BDA@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #8, le
	b.ge	LBB0_2
; %bb.1:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	add	x1, sp, #8
	mov	w2, #20
	bl	_smsusb_sendrequest
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_SW_RELOAD_REQ,4,2          ; @MSG_SW_RELOAD_REQ
	.comm	_HIF_TASK,4,2                   ; @HIF_TASK
	.comm	_DEVICE_MODE_DVBT,4,2           ; @DEVICE_MODE_DVBT
	.comm	_DEVICE_MODE_DVBT_BDA,4,2       ; @DEVICE_MODE_DVBT_BDA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid firmware id specified %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_smsusb1_setmode
.subsections_via_symbols
