	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9005_generic_read_write
_af9005_generic_read_write:             ## @af9005_generic_read_write
	.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	$152, %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	(%rdi), %rax
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm0, -176(%rbp)
	movaps	%xmm0, -192(%rbp)
	movl	$0, -128(%rbp)
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.4:
	movl	%r9d, %r13d
	cmpl	$9, %r9d
	jb	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r8, %r14
	movl	%edx, %r15d
	movq	%rdi, %r12
	movq	$14, -112(%rbp)
	movq	_AF9005_REGISTER_RW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -104(%rbp)
	movl	$12, -100(%rbp)
	movl	(%rax), %edx
	leal	1(%rdx), %edi
	movl	%edi, (%rax)
	movl	%edx, -96(%rbp)
	movl	%esi, %eax
	sarl	$8, %eax
	movl	%eax, -92(%rbp)
	movzbl	%sil, %eax
	movl	%eax, -88(%rbp)
	movq	_AF9005_OFDM_REG@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_AF9005_CMD_OFDM_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_AF9005_CMD_TUNER@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
	cmpl	$2, %r13d
	jb	LBB0_11
## %bb.10:
	movq	_AF9005_CMD_BURST@GOTPCREL(%rip), %rax
	movq	_AF9005_CMD_AUTOINC@GOTPCREL(%rip), %rdx
	leal	-8(,%r13,8), %esi
	orl	%esi, %ebx
	orl	(%rax), %ebx
	orl	(%rdx), %ebx
LBB0_11:
	orl	%r15d, %ebx
	movq	_AF9005_CMD_WRITE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_13
## %bb.12:
	leaq	-80(%rbp), %rdi
	movl	%r13d, %edx
	shlq	$2, %rdx
	movq	%r14, %rsi
	callq	_memcpy
	jmp	LBB0_15
LBB0_13:
	movq	_AF9005_TUNER_REG@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_15
## %bb.14:
	movl	(%r14), %eax
	movl	%eax, -80(%rbp)
LBB0_15:
	movl	%ebx, -84(%rbp)
	leaq	-112(%rbp), %rsi
	leaq	-192(%rbp), %rcx
	movq	%r12, %rdi
	movl	$16, %edx
	movl	$17, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_27
## %bb.16:
	movl	-184(%rbp), %eax
	movq	_AF9005_REGISTER_RW_ACK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.19:
	cmpl	$13, -180(%rbp)
	jne	LBB0_20
## %bb.21:
	movl	-176(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jne	LBB0_22
## %bb.23:
	cmpl	$1, -128(%rbp)
	jne	LBB0_24
## %bb.25:
	movq	_AF9005_CMD_READ@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%r15d, (%rax)
	jne	LBB0_27
## %bb.26:
	leaq	-160(%rbp), %rsi
	movl	%r13d, %edx
	shlq	$2, %rdx
	movq	%r14, %rdi
	callq	_memcpy
	jmp	LBB0_27
LBB0_17:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_18
LBB0_20:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_18
LBB0_22:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_18
LBB0_24:
	leaq	L_.str.5(%rip), %rdi
LBB0_18:
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"generic read/write, less than 1 byte. Makes no sense."

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"generic read/write, more than 8 bytes. Not supported."

	.comm	_AF9005_REGISTER_RW,4,2         ## @AF9005_REGISTER_RW
	.comm	_AF9005_OFDM_REG,4,2            ## @AF9005_OFDM_REG
	.comm	_AF9005_CMD_OFDM_REG,4,2        ## @AF9005_CMD_OFDM_REG
	.comm	_AF9005_CMD_TUNER,4,2           ## @AF9005_CMD_TUNER
	.comm	_AF9005_CMD_BURST,4,2           ## @AF9005_CMD_BURST
	.comm	_AF9005_CMD_AUTOINC,4,2         ## @AF9005_CMD_AUTOINC
	.comm	_AF9005_CMD_WRITE,4,2           ## @AF9005_CMD_WRITE
	.comm	_AF9005_TUNER_REG,4,2           ## @AF9005_TUNER_REG
	.comm	_AF9005_REGISTER_RW_ACK,4,2     ## @AF9005_REGISTER_RW_ACK
L_.str.2:                               ## @.str.2
	.asciz	"generic read/write, wrong reply code."

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"generic read/write, wrong length in reply."

L_.str.4:                               ## @.str.4
	.asciz	"generic read/write, wrong sequence in reply."

L_.str.5:                               ## @.str.5
	.asciz	"generic read/write wrong status code in reply."

	.comm	_AF9005_CMD_READ,4,2            ## @AF9005_CMD_READ
	.no_dead_strip	_af9005_generic_read_write
.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 af9005_generic_read_write
lCPI0_0:
	.long	14                              ; 0xe
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_af9005_generic_read_write:             ; @af9005_generic_read_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #120]
	stur	q0, [sp, #104]
	str	wzr, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	cmp	w5, #0
	b.le	LBB0_3
; %bb.1:
	mov	x20, x5
	cmp	w5, #9
	b.lo	LBB0_8
; %bb.2:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.7:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_8:
	mov	x19, x4
	mov	x21, x2
	mov	x22, x0
Lloh12:
	adrp	x9, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
Lloh14:
	adrp	x9, _AF9005_REGISTER_RW@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AF9005_REGISTER_RW@GOTPAGEOFF]
	str	d0, [sp, #72]
Lloh16:
	ldr	w9, [x9]
	mov	w10, #12
	stp	w9, w10, [sp, #80]
	ldr	w9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	asr	w8, w1, #8
	stp	w9, w8, [sp, #88]
	and	w8, w1, #0xff
	str	w8, [sp, #96]
Lloh17:
	adrp	x8, _AF9005_OFDM_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AF9005_OFDM_REG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _AF9005_CMD_OFDM_REG@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AF9005_CMD_OFDM_REG@GOTPAGEOFF]
Lloh22:
	adrp	x10, _AF9005_CMD_TUNER@GOTPAGE
Lloh23:
	ldr	x10, [x10, _AF9005_CMD_TUNER@GOTPAGEOFF]
	cmp	w8, w3
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	cmp	w20, #2
	b.lo	LBB0_10
; %bb.9:
Lloh24:
	adrp	x9, _AF9005_CMD_BURST@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AF9005_CMD_BURST@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _AF9005_CMD_AUTOINC@GOTPAGE
Lloh28:
	ldr	x10, [x10, _AF9005_CMD_AUTOINC@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	lsl	w11, w20, #3
	sub	w11, w11, #8
	orr	w8, w8, w11
	orr	w8, w8, w9
	orr	w8, w8, w10
LBB0_10:
	orr	w23, w8, w21
Lloh30:
	adrp	x8, _AF9005_CMD_WRITE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AF9005_CMD_WRITE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.11:
	add	x8, sp, #72
	add	x0, x8, #32
	mov	w8, w20
	lsl	x2, x8, #2
	mov	x1, x19
	bl	_memcpy
	b	LBB0_14
LBB0_12:
Lloh33:
	adrp	x8, _AF9005_TUNER_REG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AF9005_TUNER_REG@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_14
; %bb.13:
	ldr	w8, [x19]
	str	w8, [sp, #104]
LBB0_14:
	str	w23, [sp, #100]
	add	x1, sp, #72
	mov	x3, sp
	mov	x0, x22
	mov	w2, #16
	mov	w4, #17
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	cbnz	w0, LBB0_6
; %bb.15:
	ldr	w8, [sp, #8]
Lloh36:
	adrp	x9, _AF9005_REGISTER_RW_ACK@GOTPAGE
Lloh37:
	ldr	x9, [x9, _AF9005_REGISTER_RW_ACK@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
; %bb.16:
	ldr	w8, [sp, #12]
	cmp	w8, #13
	b.ne	LBB0_23
; %bb.17:
	ldr	w8, [sp, #16]
	ldr	w9, [sp, #88]
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.18:
	ldr	w8, [sp, #64]
	cmp	w8, #1
	b.ne	LBB0_25
; %bb.19:
Lloh39:
	adrp	x8, _AF9005_CMD_READ@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AF9005_CMD_READ@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_21
; %bb.20:
	mov	x8, sp
	add	x1, x8, #32
	mov	w8, w20
	lsl	x2, x8, #2
	mov	x0, x19
	bl	_memcpy
LBB0_21:
	mov	w0, #0
	b	LBB0_6
LBB0_22:
Lloh42:
	adrp	x0, l_.str.2@PAGE
Lloh43:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_23:
Lloh44:
	adrp	x0, l_.str.3@PAGE
Lloh45:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_24:
Lloh46:
	adrp	x0, l_.str.4@PAGE
Lloh47:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_26
LBB0_25:
Lloh48:
	adrp	x0, l_.str.5@PAGE
Lloh49:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_26:
	bl	_err
Lloh50:
	adrp	x8, _EIO@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"generic read/write, less than 1 byte. Makes no sense."

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"generic read/write, more than 8 bytes. Not supported."

	.comm	_AF9005_REGISTER_RW,4,2         ; @AF9005_REGISTER_RW
	.comm	_AF9005_OFDM_REG,4,2            ; @AF9005_OFDM_REG
	.comm	_AF9005_CMD_OFDM_REG,4,2        ; @AF9005_CMD_OFDM_REG
	.comm	_AF9005_CMD_TUNER,4,2           ; @AF9005_CMD_TUNER
	.comm	_AF9005_CMD_BURST,4,2           ; @AF9005_CMD_BURST
	.comm	_AF9005_CMD_AUTOINC,4,2         ; @AF9005_CMD_AUTOINC
	.comm	_AF9005_CMD_WRITE,4,2           ; @AF9005_CMD_WRITE
	.comm	_AF9005_TUNER_REG,4,2           ; @AF9005_TUNER_REG
	.comm	_AF9005_REGISTER_RW_ACK,4,2     ; @AF9005_REGISTER_RW_ACK
l_.str.2:                               ; @.str.2
	.asciz	"generic read/write, wrong reply code."

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"generic read/write, wrong length in reply."

l_.str.4:                               ; @.str.4
	.asciz	"generic read/write, wrong sequence in reply."

l_.str.5:                               ; @.str.5
	.asciz	"generic read/write wrong status code in reply."

	.comm	_AF9005_CMD_READ,4,2            ; @AF9005_CMD_READ
	.no_dead_strip	_af9005_generic_read_write
.subsections_via_symbols
