	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lme_firmware_switch
_lme_firmware_switch:                   ## @lme_firmware_switch
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -120(%rbp)
	movups	L___const.lme_firmware_switch.lme2510c_s7395+10(%rip), %xmm0
	movups	%xmm0, -70(%rbp)
	movaps	L___const.lme_firmware_switch.lme2510c_s7395(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	L___const.lme_firmware_switch.lme2510c_lg(%rip), %xmm0
	movaps	%xmm0, -112(%rbp)
	movabsq	$33607871718239587, %rax        ## imm = 0x77662E676C2D63
	movq	%rax, -97(%rbp)
	movl	%esi, %ebx
	andl	$1, %ebx
	xorl	%r12d, %r12d
	testl	%esi, %esi
	cmovlel	%r12d, %ebx
	cmpl	$4386, 4(%rdi)                  ## imm = 0x1122
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movq	_dvb_usb_lme2510_firmware@GOTPCREL(%rip), %r15
	cmpl	$1, (%r15)
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %r13d
	jmp	LBB0_7
LBB0_3:
	movq	_lme_firmware@GOTPCREL(%rip), %r12
	leaq	-80(%rbp), %rsi
	movq	%r12, %rdi
	movl	$26, %edx
	callq	_memcpy
	movl	(%r12), %esi
	leaq	-120(%rbp), %rdi
	movq	%r14, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movl	$1, (%r15)
LBB0_7:
	movq	_lme_firmware@GOTPCREL(%rip), %rbx
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$23, %edx
	callq	_memcpy
	movl	(%rbx), %esi
	leaq	-120(%rbp), %rdi
	movq	%r14, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_info
	movl	$0, (%r15)
	movq	-120(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	movl	%r13d, %ebx
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	movl	%ebx, %eax
	leaq	l_reltable.lme_firmware_switch(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_info
	movq	-120(%rbp), %rdi
	callq	_release_firmware
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_lme_coldreset
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
	.p2align	4                               ## @__const.lme_firmware_switch.lme2510c_s7395
L___const.lme_firmware_switch.lme2510c_s7395:
	.asciz	"dvb-usb-lme2510c-s7395.fw"

	.p2align	4                               ## @__const.lme_firmware_switch.lme2510c_lg
L___const.lme_firmware_switch.lme2510c_lg:
	.asciz	"dvb-usb-lme2510c-lg.fw"

L_.str:                                 ## @.str
	.asciz	"Loading"

L_.str.1:                               ## @.str.1
	.asciz	"Switching to"

	.section	__TEXT,__const
	.p2align	2                               ## @reltable.lme_firmware_switch
l_reltable.lme_firmware_switch:
	.long	L_.str-l_reltable.lme_firmware_switch
	.long	L_.str.1-l_reltable.lme_firmware_switch

	.comm	_dvb_usb_lme2510_firmware,4,2   ## @dvb_usb_lme2510_firmware
	.comm	_lme_firmware,4,2               ## @lme_firmware
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"FRM %s S7395 Firmware"

L_.str.3:                               ## @.str.3
	.asciz	"FRM %s LG Firmware"

L_.str.4:                               ## @.str.4
	.asciz	"FRM No Firmware Found - please install"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_lme_firmware_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lme_firmware_switch
_lme_firmware_switch:                   ; @lme_firmware_switch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	w20, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	xzr, [sp, #8]
Lloh3:
	adrp	x8, l___const.lme_firmware_switch.lme2510c_s7395@PAGE
Lloh4:
	add	x8, x8, l___const.lme_firmware_switch.lme2510c_s7395@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #48]
	ldur	q0, [x8, #10]
	stur	q0, [sp, #58]
Lloh5:
	adrp	x8, l___const.lme_firmware_switch.lme2510c_lg@PAGE
Lloh6:
	add	x8, x8, l___const.lme_firmware_switch.lme2510c_lg@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldur	x8, [x8, #15]
	stur	x8, [sp, #31]
	and	w8, w1, #0x1
	cmp	w1, #0
	csel	w21, w8, wzr, gt
	ldr	w8, [x0, #4]
	mov	w9, #4386
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.1:
	mov	x19, x0
Lloh7:
	adrp	x22, _dvb_usb_lme2510_firmware@GOTPAGE
Lloh8:
	ldr	x22, [x22, _dvb_usb_lme2510_firmware@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh9:
	adrp	x20, _lme_firmware@GOTPAGE
Lloh10:
	ldr	x20, [x20, _lme_firmware@GOTPAGEOFF]
	cmp	w8, #1
	b.eq	LBB0_7
; %bb.2:
	add	x1, sp, #48
	mov	x0, x20
	mov	w2, #26
	bl	_memcpy
	ldr	w1, [x20]
	add	x0, sp, #8
	mov	x2, x19
	bl	_request_firmware
	cbz	w0, LBB0_5
; %bb.3:
	cbz	w21, LBB0_6
; %bb.4:
	mov	w21, #0
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	w8, #1
	str	w8, [x22]
LBB0_7:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #23
	bl	_memcpy
	ldr	w1, [x20]
	add	x0, sp, #8
	mov	x2, x19
	bl	_request_firmware
	cbz	w0, LBB0_9
; %bb.8:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_info
	str	wzr, [x22]
	ldr	x0, [sp, #8]
	bl	_release_firmware
	b	LBB0_13
LBB0_9:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
Lloh17:
	adrp	x8, l___const.lme_firmware_switch.firm_msg@PAGE
Lloh18:
	add	x8, x8, l___const.lme_firmware_switch.firm_msg@PAGEOFF
	ldr	x8, [x8, w21, uxtw #3]
	str	x8, [sp]
	bl	_info
	ldr	x0, [sp, #8]
	bl	_release_firmware
	cbz	w21, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_lme_coldreset
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_12:
	mov	w20, #0
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l___const.lme_firmware_switch.lme2510c_s7395: ; @__const.lme_firmware_switch.lme2510c_s7395
	.asciz	"dvb-usb-lme2510c-s7395.fw"

l___const.lme_firmware_switch.lme2510c_lg: ; @__const.lme_firmware_switch.lme2510c_lg
	.asciz	"dvb-usb-lme2510c-lg.fw"

l_.str:                                 ; @.str
	.asciz	"Loading"

l_.str.1:                               ; @.str.1
	.asciz	"Switching to"

	.section	__DATA,__const
	.p2align	3                               ; @__const.lme_firmware_switch.firm_msg
l___const.lme_firmware_switch.firm_msg:
	.quad	l_.str
	.quad	l_.str.1

	.comm	_dvb_usb_lme2510_firmware,4,2   ; @dvb_usb_lme2510_firmware
	.comm	_lme_firmware,4,2               ; @lme_firmware
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"FRM %s S7395 Firmware"

l_.str.3:                               ; @.str.3
	.asciz	"FRM %s LG Firmware"

l_.str.4:                               ; @.str.4
	.asciz	"FRM No Firmware Found - please install"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_lme_firmware_switch
.subsections_via_symbols
