	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa717x_write
_saa717x_write:                         ## @saa717x_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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_v4l2_get_subdevdata
	movq	8(%rax), %r14
	cmpl	$1108, %ebx                     ## imm = 0x454
	jne	LBB0_3
## %bb.1:
	movq	$0, -48(%rbp)
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movw	$21508, -38(%rbp)               ## imm = 0x5404
	jmp	LBB0_2
LBB0_3:
	leal	-1124(%rbx), %ecx
	movq	$0, -48(%rbp)
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movb	%bh, -38(%rbp)
	movb	%bl, -37(%rbp)
	cmpl	$21, %ecx
	jb	LBB0_2
## %bb.4:
	movl	%ebx, %eax
	orl	$8, %eax
	cmpl	$1160, %eax                     ## imm = 0x488
	jne	LBB0_5
LBB0_2:
	movq	%rbx, %r8
	movl	%r12d, %ebx
	movl	%r12d, %eax
	shrl	$16, %eax
	movb	%al, -34(%rbp)
	movb	%bh, -35(%rbp)
	movl	$5, %eax
LBB0_6:
	movb	%bl, -36(%rbp)
	movl	%eax, -72(%rbp)
	leaq	-38(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$2, %edi
	movq	%r15, %rdx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%ebx, %r9d
	callq	_v4l2_dbg
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	sete	%cl
	movl	%ecx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %r8
	movl	$3, %eax
	movl	%r12d, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrote:  reg 0x%03x=%08x\n"

	.no_dead_strip	_saa717x_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa717x_write
_saa717x_write:                         ; @saa717x_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_v4l2_get_subdevdata
	ldr	x20, [x0, #8]
	cmp	w21, #1108
	b.ne	LBB0_2
; %bb.1:
	str	xzr, [sp, #32]
	ldr	w8, [x0]
	str	w8, [sp, #24]
	mov	w8, #21508
	sturh	w8, [x29, #-38]
	b	LBB0_4
LBB0_2:
	sub	w8, w21, #1124
	str	xzr, [sp, #32]
	ldr	w9, [x0]
	str	w9, [sp, #24]
	lsr	w9, w21, #8
	sturb	w9, [x29, #-38]
	sturb	w21, [x29, #-37]
	cmp	w8, #21
	b.lo	LBB0_4
; %bb.3:
	orr	w8, w21, #0x8
	cmp	w8, #1160
	b.ne	LBB0_6
LBB0_4:
	lsr	w8, w19, #16
	sturb	w8, [x29, #-34]
	lsr	w8, w19, #8
	sturb	w8, [x29, #-35]
	mov	w8, #5
LBB0_5:
	sturb	w19, [x29, #-36]
	str	w8, [sp, #8]
	sub	x8, x29, #38
	str	x8, [sp, #16]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x22
	mov	x4, x21
	mov	x5, x19
	bl	_v4l2_dbg
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	cset	w0, eq
	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
	add	sp, sp, #96
	ret
LBB0_6:
	mov	w8, #3
	b	LBB0_5
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrote:  reg 0x%03x=%08x\n"

	.no_dead_strip	_saa717x_write
.subsections_via_symbols
