	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_avermedia_cardbus
_get_key_avermedia_cardbus:             ## @get_key_avermedia_cardbus
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movl	(%rax), %ecx
	movl	%ecx, -96(%rbp)
	leaq	-99(%rbp), %rdx
	movq	%rdx, -88(%rbp)
	movq	$1, -80(%rbp)
	movl	%ecx, -72(%rbp)
	leaq	-97(%rbp), %rcx
	movq	%rcx, -64(%rbp)
	movl	$1, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -52(%rbp)
	movb	$13, -99(%rbp)
	movl	4(%rax), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	cmpb	$-1, -97(%rbp)
	je	LBB0_8
## %bb.3:
	movb	$11, -99(%rbp)
	leaq	-98(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	(%r13), %rax
	movl	4(%rax), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.4:
	movzbl	-98(%rbp), %ecx
	cmpl	$255, %ecx
	je	LBB0_8
## %bb.5:
	movq	8(%r13), %rdi
	movzbl	-97(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movb	-98(%rbp), %al
	leal	-5(%rax), %ecx
	cmpb	$-4, %cl
	ja	LBB0_7
## %bb.6:
	movq	8(%r13), %rdi
	movzbl	-97(%rbp), %ecx
	movzbl	%al, %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movb	-98(%rbp), %al
LBB0_7:
	shlb	$6, %al
	andb	$64, %al
	orb	-97(%rbp), %al
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r12)
	movb	%al, (%r15)
	movq	$0, (%r14)
	movl	$1, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	8(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read error\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"read key 0x%02x/0x%02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"warning: invalid key group 0x%02x for key 0x%02x\n"

	.comm	_RC_PROTO_UNKNOWN,4,2           ## @RC_PROTO_UNKNOWN
	.no_dead_strip	_get_key_avermedia_cardbus
.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 get_key_avermedia_cardbus
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_get_key_avermedia_cardbus:             ; @get_key_avermedia_cardbus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0]
	ldr	w9, [x8]
	str	w9, [sp, #24]
	add	x10, sp, #23
	str	x10, [sp, #32]
Lloh3:
	adrp	x10, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	str	d0, [sp, #40]
	str	w9, [sp, #48]
	add	x9, sp, #22
	str	x9, [sp, #56]
	mov	w9, #1
Lloh5:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	stp	w9, w10, [sp, #64]
	mov	w9, #13
	strb	w9, [sp, #23]
	ldr	w0, [x8, #4]
	add	x1, sp, #24
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_7
; %bb.1:
	ldrb	w8, [sp, #22]
	cmp	w8, #255
	b.eq	LBB0_8
; %bb.2:
	mov	w8, #11
	strb	w8, [sp, #23]
	add	x8, sp, #21
	str	x8, [sp, #56]
	ldr	x8, [x22]
	ldr	w0, [x8, #4]
	add	x1, sp, #24
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_7
; %bb.3:
	ldrb	w8, [sp, #21]
	cmp	w8, #255
	b.eq	LBB0_8
; %bb.4:
	ldr	x0, [x22, #8]
	ldrb	w9, [sp, #22]
	stp	x9, x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldrb	w2, [sp, #21]
	sub	w8, w2, #5
	and	w8, w8, #0xff
	cmp	w8, #252
	b.hi	LBB0_6
; %bb.5:
	ldr	x0, [x22, #8]
	ldrb	w3, [sp, #22]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	ldrb	w2, [sp, #21]
LBB0_6:
	ubfiz	w8, w2, #6, #1
	ldrb	w9, [sp, #22]
Lloh12:
	adrp	x10, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh14:
	ldr	w9, [x10]
	str	w9, [x21]
	strb	w8, [x20]
	str	xzr, [x19]
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	ldr	x0, [x22, #8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read error\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"read key 0x%02x/0x%02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"warning: invalid key group 0x%02x for key 0x%02x\n"

	.comm	_RC_PROTO_UNKNOWN,4,2           ; @RC_PROTO_UNKNOWN
	.no_dead_strip	_get_key_avermedia_cardbus
.subsections_via_symbols
