	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stv06xx_write_sensor_words     ## -- Begin function stv06xx_write_sensor_words
	.p2align	4, 0x90
_stv06xx_write_sensor_words:            ## @stv06xx_write_sensor_words
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	8(%rdi), %r12
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_gspca_dbg
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movslq	%r14d, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_I2C_BUFFER_LENGTH@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	addl	%r14d, %r13d
	movq	_I2C_BUFFER_LENGTH@GOTPCREL(%rip), %r15
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%r12)
	decl	%r14d
	movl	%r14d, 132(%r12)
	movq	_I2C_WRITE_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 136(%r12)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movl	(%r15), %r10d
	movq	_STV06XX_URB_MSG_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$4, %edx
	movl	$64, %ecx
	movl	$1024, %r8d                     ## imm = 0x400
	xorl	%r9d, %r9d
	pushq	%r11
	pushq	%r10
	pushq	%r12
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_8
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	jge	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_I2C_MAX_WORDS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r13d, %rax
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leal	(%r13,%r13), %r15d
	incq	%rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	%r15d, %rax
	movl	(%rbx,%rax,4), %ecx
	movl	%ecx, (%r12,%r13,4)
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	movl	(%rbx,%rcx,4), %edx
	movl	%edx, 64(%r12,%r13,8)
	movl	(%rbx,%rcx,4), %edx
	sarl	$8, %edx
	movl	%edx, 68(%r12,%r13,8)
	movq	_D_CONF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%rbx,%rcx,4), %ecx
	movl	(%rbx,%rax,4), %r8d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_gspca_dbg
	leaq	1(%r13), %r14
	movq	_I2C_MAX_WORDS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	-88(%rbp), %r13                 ## 8-byte Folded Reload
	addl	$2, %r15d
	cmpq	-80(%rbp), %r13                 ## 8-byte Folded Reload
	movq	%r14, %r13
	jl	LBB0_4
	jmp	LBB0_6
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stv06xx_write_sensor_finish    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C: Command buffer contains %d entries\n"

	.comm	_I2C_BUFFER_LENGTH,4,2          ## @I2C_BUFFER_LENGTH
	.comm	_I2C_MAX_WORDS,4,2              ## @I2C_MAX_WORDS
L_.str.1:                               ## @.str.1
	.asciz	"I2C: Writing 0x%04x to reg 0x%02x\n"

	.comm	_I2C_WRITE_CMD,4,2              ## @I2C_WRITE_CMD
	.comm	_STV06XX_URB_MSG_TIMEOUT,4,2    ## @STV06XX_URB_MSG_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stv06xx_write_sensor_words     ; -- Begin function stv06xx_write_sensor_words
	.p2align	2
_stv06xx_write_sensor_words:            ; @stv06xx_write_sensor_words
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x23, x8, [x0, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _D_CONF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x19
	bl	_gspca_dbg
	mov	w25, #0
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	sxtw	x27, w19
Lloh5:
	adrp	x24, _I2C_BUFFER_LENGTH@GOTPAGE
Lloh6:
	ldr	x24, [x24, _I2C_BUFFER_LENGTH@GOTPAGEOFF]
Lloh7:
	adrp	x26, _I2C_MAX_WORDS@GOTPAGE
Lloh8:
	ldr	x26, [x26, _I2C_MAX_WORDS@GOTPAGEOFF]
Lloh9:
	adrp	x28, l_.str.1@PAGE
Lloh10:
	add	x28, x28, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #0
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x20]
	ldr	w9, [x9]
	sub	w8, w8, #1
	stp	w9, w8, [x23, #128]
Lloh11:
	adrp	x8, _I2C_WRITE_CMD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_WRITE_CMD@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x23, #136]
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	ldr	w7, [x24]
Lloh14:
	adrp	x8, _STV06XX_URB_MSG_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STV06XX_URB_MSG_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x19
	mov	w2, #4
	mov	w3, #64
	mov	w4, #1024
	mov	w5, #0
	mov	x6, x23
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	w25, w8
	b.ge	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x24]
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	sxtw	x9, w25
	add	x24, x9, #1
	str	x25, [sp, #24]                  ; 8-byte Folded Spill
	lsl	w22, w25, #1
	mov	x19, x27
	mov	x27, x20
	mov	x20, x26
	mov	w26, #64
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x25, x8
	sbfiz	x8, x22, #2, #32
	ldr	w9, [x21, x8]
	str	w9, [x23, x25, lsl #2]
	add	w9, w22, #1
	sbfiz	x9, x9, #2, #32
	ldr	w10, [x21, x9]
	add	x11, x23, x26
	str	w10, [x11]
	ldr	w10, [x21, x9]
	asr	w10, w10, #8
	str	w10, [x11, #4]
Lloh17:
	adrp	x10, _D_CONF@GOTPAGE
Lloh18:
	ldr	x10, [x10, _D_CONF@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x10]
	ldr	w3, [x21, x9]
	ldr	w8, [x21, x8]
	str	x8, [sp]
	mov	x0, x27
	mov	x2, x28
	bl	_gspca_dbg
	add	x8, x25, #1
	add	x9, x24, x25
	ldrsw	x10, [x20]
	add	x26, x26, #8
	add	w22, w22, #2
	cmp	x8, x10
	ccmp	x9, x19, #0, lt
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x25, [sp, #24]                  ; 8-byte Folded Reload
	add	w25, w25, w8
Lloh20:
	adrp	x24, _I2C_BUFFER_LENGTH@GOTPAGE
Lloh21:
	ldr	x24, [x24, _I2C_BUFFER_LENGTH@GOTPAGEOFF]
	mov	x26, x20
	mov	x20, x27
	mov	x27, x19
	b	LBB0_2
LBB0_8:
	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
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_stv06xx_write_sensor_finish
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C: Command buffer contains %d entries\n"

	.comm	_I2C_BUFFER_LENGTH,4,2          ; @I2C_BUFFER_LENGTH
	.comm	_I2C_MAX_WORDS,4,2              ; @I2C_MAX_WORDS
l_.str.1:                               ; @.str.1
	.asciz	"I2C: Writing 0x%04x to reg 0x%02x\n"

	.comm	_I2C_WRITE_CMD,4,2              ; @I2C_WRITE_CMD
	.comm	_STV06XX_URB_MSG_TIMEOUT,4,2    ; @STV06XX_URB_MSG_TIMEOUT
.subsections_via_symbols
