	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sn9c102_i2c_try_raw_write      ## -- Begin function sn9c102_i2c_try_raw_write
	.p2align	4, 0x90
_sn9c102_i2c_try_raw_write:             ## @sn9c102_i2c_try_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	32(%rbp), %r10d
	movq	(%rsi), %rax
	movq	_SN9C102_I2C_2WIRES@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	cmpq	(%rdi), %rax
	movl	24(%rbp), %esi
	sete	%bl
	shll	$7, %ebx
	movq	_SN9C102_I2C_400KHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	8(%r12), %eax
	setne	%dil
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	shll	$4, %eax
	addl	$-16, %eax
	orl	%ebx, %eax
	movq	(%r14), %rbx
	orl	%edi, %eax
	movq	8(%r14), %r13
	movl	%eax, (%rbx)
	movl	16(%rbp), %eax
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, 4(%rbx)
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, 8(%rbx)
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r9d, 12(%rbx)
	movl	%eax, 16(%rbx)
	movl	%esi, 20(%rbx)
	movl	%r10d, 24(%rbx)
	movl	$23, 28(%rbx)
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_SN9C102_CTRL_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	$8, %edx
	movl	$65, %ecx
	movl	$8, %r8d
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	$8
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_sn9c102_i2c_wait
	movq	%rax, %r13
	addl	%ebx, %r13d
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_sn9c102_i2c_detect_write_error
	movq	%rax, %rbx
	addl	%r13d, %ebx
	je	LBB0_2
## %bb.1:
	movl	12(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_DBG
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	16(%rbp), %r9d
	movl	32(%rbp), %eax
	pushq	%rax
	movl	24(%rbp), %eax
	pushq	%rax
	callq	_PDBGG
	addq	$16, %rsp
	negl	%ebx
	sbbl	%r15d, %r15d
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SN9C102_I2C_2WIRES,8,3         ## @SN9C102_I2C_2WIRES
	.comm	_SN9C102_I2C_400KHZ,4,2         ## @SN9C102_I2C_400KHZ
	.comm	_SN9C102_CTRL_TIMEOUT,4,2       ## @SN9C102_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C write failed for %s image sensor"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sn9c102_i2c_try_raw_write      ; -- Begin function sn9c102_i2c_try_raw_write
	.p2align	2
_sn9c102_i2c_try_raw_write:             ; @sn9c102_i2c_try_raw_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x27, x0
	ldr	w23, [x29, #16]
	ldp	x19, x28, [x0]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _SN9C102_I2C_2WIRES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SN9C102_I2C_2WIRES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	ldr	w9, [x1, #8]
Lloh3:
	adrp	x10, _SN9C102_I2C_400KHZ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SN9C102_I2C_400KHZ@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	lsl	w10, w2, #4
	sub	w10, w10, #16
	orr	w8, w10, w8, lsl #7
	orr	w8, w8, w9
	stp	w8, w3, [x19]
	stp	w4, w5, [x19, #8]
	stp	w6, w7, [x19, #16]
	str	w7, [sp, #12]                   ; 4-byte Folded Spill
	mov	w8, #23
	stp	w23, w8, [x19, #24]
	mov	x0, x28
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh6:
	adrp	x8, _SN9C102_CTRL_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SN9C102_CTRL_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x28
	mov	w2, #8
	mov	w3, #65
	mov	w4, #8
	mov	w5, #0
	mov	x6, x19
	mov	w7, #8
	bl	_usb_control_msg
	cmp	w0, #0
	csel	w19, w0, wzr, lt
	mov	x0, x27
	mov	x1, x26
	bl	_sn9c102_i2c_wait
	add	w19, w0, w19
	mov	x0, x27
	mov	x1, x26
	bl	_sn9c102_i2c_detect_write_error
	adds	w19, w19, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w2, [x26, #12]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_DBG
LBB0_2:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x25
	mov	x2, x24
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	ldr	w6, [sp, #12]                   ; 4-byte Folded Reload
	mov	x7, x23
	bl	_PDBGG
	cmp	w19, #0
	csetm	w0, ne
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SN9C102_I2C_2WIRES,8,3         ; @SN9C102_I2C_2WIRES
	.comm	_SN9C102_I2C_400KHZ,4,2         ; @SN9C102_I2C_400KHZ
	.comm	_SN9C102_CTRL_TIMEOUT,4,2       ; @SN9C102_CTRL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C write failed for %s image sensor"

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

.subsections_via_symbols
