	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_et61x251_i2c_raw_write         ## -- Begin function et61x251_i2c_raw_write
	.p2align	4, 0x90
_et61x251_i2c_raw_write:                ## @et61x251_i2c_raw_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	$40, %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	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	40(%rbp), %edi
	movl	32(%rbp), %esi
	movl	24(%rbp), %edx
	movl	16(%rbp), %eax
	movq	(%r14), %rbx
	movq	24(%r14), %r15
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, (%rbx)
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, 4(%rbx)
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%r9d, 8(%rbx)
	movl	%eax, 12(%rbx)
	movl	%edx, 16(%rbx)
	movl	%esi, 20(%rbx)
	movl	%edi, 24(%rbx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	leal	-1(%r13), %r10d
	movq	_ET61X251_CTRL_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$65, %ecx
	xorl	%r8d, %r8d
	movl	$129, %r9d
	pushq	%r11
	pushq	%r10
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %r12d
	sarl	$31, %r12d
	andl	%eax, %r12d
	movl	48(%rbp), %eax
	movl	%eax, (%rbx)
	leaq	8(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, %eax
	shll	$4, %eax
	orl	12(%r14), %eax
	orl	$2, %eax
	movl	%eax, 8(%rbx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_ET61X251_CTRL_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$65, %ecx
	xorl	%r8d, %r8d
	movl	$136, %r9d
	pushq	%r10
	pushq	$3
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %r13d
	sarl	$31, %r13d
	andl	%eax, %r13d
	addl	%r12d, %r13d
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, (%rbx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_ET61X251_CTRL_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$65, %ecx
	xorl	%r8d, %r8d
	movl	$128, %r9d
	pushq	%r10
	pushq	$1
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
	addl	%r13d, %ebx
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_et61x251_i2c_wait
	movq	%rax, %r15
	negl	%r15d
	cmpl	%r15d, %ebx
	je	LBB0_2
## %bb.1:
	movl	16(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_DBG
LBB0_2:
	xorl	%r14d, %r14d
	cmpl	%r15d, %ebx
	setne	%r14b
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	48(%rbp), %edx
	movl	%r12d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movl	40(%rbp), %eax
	pushq	%rax
	movl	32(%rbp), %eax
	pushq	%rax
	movl	24(%rbp), %eax
	pushq	%rax
	movl	16(%rbp), %eax
	pushq	%rax
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	callq	_PDBGG
	addq	$48, %rsp
	negl	%r14d
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ET61X251_CTRL_TIMEOUT,4,2      ## @ET61X251_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C raw write failed for %s image sensor"

L_.str.1:                               ## @.str.1
	.asciz	"I2C raw write: %u bytes, address = 0x%02X, data1 = 0x%02X, data2 = 0x%02X, data3 = 0x%02X, data4 = 0x%02X, data5 = 0x%02X, data6 = 0x%02X, data7 = 0x%02X, data8 = 0x%02X"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_et61x251_i2c_raw_write         ; -- Begin function et61x251_i2c_raw_write
	.p2align	2
_et61x251_i2c_raw_write:                ; @et61x251_i2c_raw_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x26, x2
	mov	x25, x1
	mov	x20, x0
	ldp	w8, w21, [x29, #20]
	ldr	w22, [x29, #16]
	ldr	x19, [x0, #24]
	ldr	x28, [x0]
	stp	w3, w4, [sp, #32]               ; 8-byte Folded Spill
	stp	w3, w4, [x28]
	stp	w5, w6, [sp, #40]               ; 8-byte Folded Spill
	stp	w5, w6, [x28, #8]
	str	w7, [sp, #28]                   ; 4-byte Folded Spill
	stp	w7, w22, [x28, #16]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	str	w8, [x28, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	sub	w7, w25, #1
Lloh0:
	adrp	x23, _ET61X251_CTRL_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ET61X251_CTRL_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #65
	mov	w4, #0
	mov	w5, #129
	mov	x6, x28
	bl	_usb_control_msg
	str	w21, [sp, #24]                  ; 4-byte Folded Spill
	str	w21, [x28]
	mov	x27, x20
	ldr	w8, [x27, #8]!
	cmp	w0, #0
	csel	w24, w0, wzr, lt
	str	w8, [x28, #4]
	ldr	w8, [x20, #12]
	orr	w8, w8, w25, lsl #4
	orr	w8, w8, #0x2
	str	w8, [x28, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	ldr	w8, [x23]
	str	w8, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #65
	mov	w4, #0
	mov	w5, #136
	mov	x6, x28
	mov	w7, #3
	bl	_usb_control_msg
	cmp	w0, #0
	csel	w8, w0, wzr, lt
	add	w24, w8, w24
	mov	x21, x26
	str	w26, [x28]
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	ldr	w8, [x23]
	str	w8, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #65
	mov	w4, #0
	mov	w5, #128
	mov	x6, x28
	mov	w7, #1
	bl	_usb_control_msg
	cmp	w0, #0
	csel	w8, w0, wzr, lt
	add	w19, w24, w8
	mov	x0, x20
	mov	x1, x27
	bl	_et61x251_i2c_wait
	neg	w23, w0
	cmn	w19, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w2, [x20, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_DBG
LBB0_2:
	ldp	w8, w2, [sp, #20]               ; 8-byte Folded Reload
	stp	w22, w8, [sp, #4]
	ldp	w8, w4, [sp, #28]               ; 8-byte Folded Reload
	str	w8, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x25
	mov	x3, x21
	ldp	w5, w6, [sp, #36]               ; 8-byte Folded Reload
	ldr	w7, [sp, #44]                   ; 4-byte Folded Reload
	bl	_PDBGG
	cmp	w19, w23
	csetm	w0, ne
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ET61X251_CTRL_TIMEOUT,4,2      ; @ET61X251_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C raw write failed for %s image sensor"

l_.str.1:                               ; @.str.1
	.asciz	"I2C raw write: %u bytes, address = 0x%02X, data1 = 0x%02X, data2 = 0x%02X, data3 = 0x%02X, data4 = 0x%02X, data5 = 0x%02X, data6 = 0x%02X, data7 = 0x%02X, data8 = 0x%02X"

.subsections_via_symbols
