	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_read_eeprom               ## -- Begin function cx18_read_eeprom
	.p2align	4, 0x90
_cx18_read_eeprom:                      ## @cx18_read_eeprom
	.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	%rbx
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movl	16(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	8(%r14), %rax
	movq	%rax, 8(%rbx)
	movl	$80, (%rbx)
	leaq	-1056(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_tveeprom_read
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movq	(%r14), %rax
	movl	(%rax), %eax
	leal	-129(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_3
## %bb.10:
	leaq	-1056(%rbp), %rsi
	movq	%r15, %rdi
	callq	_tveeprom_hauppauge_analog
	jmp	LBB0_7
LBB0_3:
	cmpl	$128, %eax
	je	LBB0_5
## %bb.4:
	cmpl	$132, %eax
	jne	LBB0_6
LBB0_5:
	movl	$1816, (%r15)                   ## imm = 0x718
	leaq	-1056(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_cx18_eeprom_dump
	movl	-1052(%rbp), %edx
	movl	-1048(%rbp), %esi
	movl	-1040(%rbp), %ecx
	movl	-1044(%rbp), %r8d
	leaq	L_.str.1(%rip), %rdi
	callq	_CX18_INFO
	jmp	LBB0_7
LBB0_6:
	movl	$-1, (%r15)
	leaq	-1056(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_cx18_eeprom_dump
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cx18 tveeprom tmp"

L_.str.1:                               ## @.str.1
	.asciz	"eeprom PCI ID: %02x%02x:%02x%02x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_read_eeprom               ; -- Begin function cx18_read_eeprom
	.p2align	2
_cx18_read_eeprom:                      ; @cx18_read_eeprom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	sub	sp, sp, #1040
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	x0, x1
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
	ldr	x8, [x20, #8]
	str	x8, [x19, #8]
	mov	w8, #80
	str	w8, [x19]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1024
	bl	_tveeprom_read
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x20]
	ldr	w8, [x8]
	sub	w9, w8, #129
	cmp	w9, #3
	b.hs	LBB0_4
; %bb.3:
	add	x1, sp, #8
	mov	x0, x21
	bl	_tveeprom_hauppauge_analog
	b	LBB0_8
LBB0_4:
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.5:
	cmp	w8, #132
	b.ne	LBB0_7
LBB0_6:
	mov	w8, #1816
	str	w8, [x21]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1024
	bl	_cx18_eeprom_dump
	ldp	w2, w1, [sp, #12]
	ldp	w4, w3, [sp, #20]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_INFO
	b	LBB0_8
LBB0_7:
	mov	w8, #-1
	str	w8, [x21]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1024
	bl	_cx18_eeprom_dump
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cx18 tveeprom tmp"

l_.str.1:                               ; @.str.1
	.asciz	"eeprom PCI ID: %02x%02x:%02x%02x\n"

.subsections_via_symbols
