	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_af9005_read_tuner_registers    ## -- Begin function af9005_read_tuner_registers
	.p2align	4, 0x90
_af9005_read_tuner_registers:           ## @af9005_read_tuner_registers
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%edx, -56(%rbp)
	movl	(%rcx), %eax
	movl	%eax, -52(%rbp)
	incl	%edx
	movl	%edx, (%rcx)
	movq	_APO_REG_I2C_RW_SILICON_TUNER@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	$192, %esi
	movl	$2, %ecx
	callq	_af9005_write_tuner_registers
	testl	%eax, %eax
	jne	LBB0_14
LBB0_2:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	_af9005_usb_read_tuner_registers
	testl	%eax, %eax
	je	LBB0_3
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$200, %ebx
	leaq	-60(%rbp), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$41992, %esi                    ## imm = 0xA408
	movq	%r13, %rdx
	callq	_af9005_read_ofdm_register
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, -60(%rbp)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$50, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_4
## %bb.7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_8:
	movq	_xd_I2C_i2c_m_data8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_af9005_write_ofdm_register
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.11:
	movl	%r15d, %r13d
	xorl	%ebx, %ebx
	leaq	-60(%rbp), %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	41984(%rbx), %esi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_af9005_read_ofdm_register
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	-60(%rbp), %eax
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	xorl	%eax, %eax
	cmpq	%rbx, %r13
	jne	LBB0_12
	jmp	LBB0_14
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_APO_REG_I2C_RW_SILICON_TUNER,8,3 ## @APO_REG_I2C_RW_SILICON_TUNER
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_xd_I2C_i2c_m_data8,4,2         ## @xd_I2C_i2c_m_data8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_af9005_read_tuner_registers    ; -- Begin function af9005_read_tuner_registers
	.p2align	2
_af9005_read_tuner_registers:           ; @af9005_read_tuner_registers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x4
	mov	x19, x3
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x3]
	stp	w2, w8, [sp, #16]
	add	w8, w2, #1
	str	w8, [x3]
Lloh3:
	adrp	x8, _APO_REG_I2C_RW_SILICON_TUNER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _APO_REG_I2C_RW_SILICON_TUNER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #192
	mov	w3, #2
	bl	_af9005_write_tuner_registers
	cbnz	w0, LBB0_3
LBB0_2:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	w3, #1
	bl	_af9005_usb_read_tuner_registers
	cbz	w0, LBB0_5
LBB0_3:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	mov	w22, #200
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #41992
	bl	_af9005_read_ofdm_register
	cbnz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #50
	bl	_msleep
	subs	w22, w22, #1
	b.ne	LBB0_6
; %bb.9:
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_10:
Lloh12:
	adrp	x8, _xd_I2C_i2c_m_data8@GOTPAGE
Lloh13:
	ldr	x8, [x8, _xd_I2C_i2c_m_data8@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_3
; %bb.11:
	cmp	w21, #1
	b.lt	LBB0_15
; %bb.12:
	mov	w22, w21
	mov	w21, #41984
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_af9005_read_ofdm_register
	cbnz	w0, LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #12]
	str	w8, [x19], #4
	add	w21, w21, #1
	subs	x22, x22, #1
	b.ne	LBB0_13
	b	LBB0_3
LBB0_15:
	mov	w0, #0
	b	LBB0_3
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_APO_REG_I2C_RW_SILICON_TUNER,8,3 ; @APO_REG_I2C_RW_SILICON_TUNER
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_xd_I2C_i2c_m_data8,4,2         ; @xd_I2C_i2c_m_data8
.subsections_via_symbols
