	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function legacy_dvb_usb_setkeycode
_legacy_dvb_usb_setkeycode:             ## @legacy_dvb_usb_setkeycode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_input_get_drvdata
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.1:
	movq	8(%rax), %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rax,%rdx,8)
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_2
## %bb.4:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_KEY_UNKNOWN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rsi,8), %edx
	cmpl	%r8d, %edx
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edi, %edx
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_5
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_9:
	movl	%r14d, 4(%rax,%rdx,8)
	jmp	LBB0_11
LBB0_10:
	movl	%ebx, (%rax,%rsi,8)
	movl	%r14d, 4(%rax,%rsi,8)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_KEY_UNKNOWN,4,2                ## @KEY_UNKNOWN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_legacy_dvb_usb_setkeycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function legacy_dvb_usb_setkeycode
_legacy_dvb_usb_setkeycode:             ; @legacy_dvb_usb_setkeycode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_input_get_drvdata
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	ldr	x9, [x0, #8]
	add	x10, x9, #4
	mov	x11, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x10, #-4]
	cmp	w12, w20
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #8
	subs	x11, x11, #1
	b.ne	LBB0_2
; %bb.4:
Lloh0:
	adrp	x10, _KEY_RESERVED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _KEY_RESERVED@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _KEY_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x11, [x11, _KEY_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	add	x9, x9, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9]
	cmp	w12, w10
	ccmp	w12, w11, #4, ne
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_5
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	str	w19, [x10]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
	stp	w20, w19, [x9, #-4]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_KEY_UNKNOWN,4,2                ; @KEY_UNKNOWN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_legacy_dvb_usb_setkeycode
.subsections_via_symbols
