	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dtv5100_i2c_msg
_dtv5100_i2c_msg:                       ## @dtv5100_i2c_msg
	.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
                                        ## kill: def $r9d killed $r9d def $r9
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	cmpl	$2, %ecx
	je	LBB0_7
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_11
## %bb.2:
	movq	_DTV5100_DEMOD_ADDR@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_DTV5100_DEMOD_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_DTV5100_DEMOD_ADDR@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_8
## %bb.9:
	movq	_DTV5100_DEMOD_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_11:
	leaq	L_.str(%rip), %rdi
	movl	%ecx, %esi
	callq	_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	jmp	LBB0_12
LBB0_3:
	movq	_DTV5100_TUNER_READ@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_6
LBB0_8:
	movq	_DTV5100_TUNER_WRITE@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movl	4(%rdx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_6:
	shll	$8, %r14d
	addl	(%rdx), %r14d
	movl	(%r12), %edi
	movq	%r8, %rsi
	movl	%r9d, %edx
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	callq	_memcpy
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movl	(%r12), %r10d
	movq	_DTV5100_USB_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r14d, %r9d
	pushq	%r11
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	callq	_usb_control_msg
	addq	$56, %rsp
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DTV5100_DEMOD_ADDR,4,2         ## @DTV5100_DEMOD_ADDR
	.comm	_DTV5100_DEMOD_READ,4,2         ## @DTV5100_DEMOD_READ
	.comm	_DTV5100_TUNER_READ,4,2         ## @DTV5100_TUNER_READ
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_DTV5100_DEMOD_WRITE,4,2        ## @DTV5100_DEMOD_WRITE
	.comm	_DTV5100_TUNER_WRITE,4,2        ## @DTV5100_TUNER_WRITE
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wlen = %x, aborting."

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DTV5100_USB_TIMEOUT,4,2        ## @DTV5100_USB_TIMEOUT
	.no_dead_strip	_dtv5100_i2c_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dtv5100_i2c_msg
_dtv5100_i2c_msg:                       ; @dtv5100_i2c_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x20, x0
	ldr	x25, [x0, #8]
	cmp	w3, #2
	b.eq	LBB0_3
; %bb.1:
	cmp	w3, #1
	b.ne	LBB0_5
; %bb.2:
	mov	w21, #0
Lloh0:
	adrp	x8, _DTV5100_DEMOD_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DTV5100_DEMOD_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DTV5100_DEMOD_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DTV5100_DEMOD_READ@GOTPAGEOFF]
Lloh5:
	adrp	x10, _DTV5100_TUNER_READ@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DTV5100_TUNER_READ@GOTPAGEOFF]
	cmp	w8, w1
	csel	x8, x9, x10, eq
Lloh7:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
	ldr	w22, [x8]
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w23, w9, w8
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _DTV5100_DEMOD_ADDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DTV5100_DEMOD_ADDR@GOTPAGEOFF]
Lloh15:
	adrp	x9, _DTV5100_DEMOD_WRITE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DTV5100_DEMOD_WRITE@GOTPAGEOFF]
Lloh17:
	adrp	x10, _DTV5100_TUNER_WRITE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DTV5100_TUNER_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w1
	csel	x8, x9, x10, eq
	ldr	w22, [x8]
Lloh20:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w23, w9, w8
	ldr	w21, [x2, #4]
LBB0_4:
	ldr	w8, [x2]
	add	w24, w8, w1, lsl #8
	ldr	w0, [x25]
	mov	x1, x4
	mov	x2, x19
	bl	_memcpy
	mov	w0, #1
	bl	_msleep
	ldr	w20, [x20]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
	ldr	w6, [x25]
Lloh26:
	adrp	x8, _DTV5100_USB_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DTV5100_USB_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x21
	mov	x5, x24
	mov	x7, x19
	bl	_usb_control_msg
	b	LBB0_6
LBB0_5:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x3
	bl	_warn
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DTV5100_DEMOD_ADDR,4,2         ; @DTV5100_DEMOD_ADDR
	.comm	_DTV5100_DEMOD_READ,4,2         ; @DTV5100_DEMOD_READ
	.comm	_DTV5100_TUNER_READ,4,2         ; @DTV5100_TUNER_READ
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_DTV5100_DEMOD_WRITE,4,2        ; @DTV5100_DEMOD_WRITE
	.comm	_DTV5100_TUNER_WRITE,4,2        ; @DTV5100_TUNER_WRITE
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wlen = %x, aborting."

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DTV5100_USB_TIMEOUT,4,2        ; @DTV5100_USB_TIMEOUT
	.no_dead_strip	_dtv5100_i2c_msg
.subsections_via_symbols
