	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa717x_read
_saa717x_read:                          ## @saa717x_read
	.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	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_v4l2_get_subdevdata
	movq	8(%rax), %rdi
	leal	-1028(%rbx), %ecx
	cmpl	$181, %ecx
	setb	%cl
	cmpl	$1320, %ebx                     ## imm = 0x528
	sete	%dl
	orb	%cl, %dl
	movl	$0, -100(%rbp)
	movq	$0, -72(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -40(%rbp)
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%eax, -80(%rbp)
	movb	%bh, -102(%rbp)
	movq	%rbx, %r15
	movb	%bl, -101(%rbp)
	movl	$2, -96(%rbp)
	leaq	-102(%rbp), %rax
	movq	%rax, -88(%rbp)
	movzbl	%dl, %ebx
	leal	1(%rbx,%rbx), %eax
	movl	%eax, -64(%rbp)
	leaq	-100(%rbp), %rax
	movq	%rax, -56(%rbp)
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpb	$1, %bl
	jne	LBB0_2
## %bb.1:
	movzbl	-98(%rbp), %eax
	shll	$16, %eax
	movzbl	-99(%rbp), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	movzbl	-100(%rbp), %ebx
	orl	%ecx, %ebx
	jmp	LBB0_3
LBB0_2:
	movzbl	-100(%rbp), %ebx
LBB0_3:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$2, %edi
	movq	%r14, %rdx
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	callq	_v4l2_dbg
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read:  reg 0x%03x=0x%08x\n"

	.no_dead_strip	_saa717x_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa717x_read
_saa717x_read:                          ; @saa717x_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_v4l2_get_subdevdata
	ldr	x8, [x0, #8]
	sub	w9, w19, #1028
	cmp	w19, #1320
	mov	w10, #181
	ccmp	w9, w10, #0, ne
	cset	w21, lo
	str	wzr, [sp]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	xzr, [sp, #32]
	str	x9, [sp, #64]
	ldr	w9, [x0]
	str	w9, [sp, #56]
	lsr	w10, w19, #8
	strb	w10, [sp, #6]
	strb	w19, [sp, #7]
	mov	w10, #2
	str	w10, [sp, #8]
	add	x10, sp, #6
	str	x10, [sp, #16]
	cmp	w21, #0
	mov	w10, #3
	csinc	w10, w10, wzr, ne
	str	w9, [sp, #24]
	str	w10, [sp, #40]
	mov	x9, sp
	str	x9, [sp, #48]
	add	x1, sp, #8
	mov	x0, x8
	mov	w2, #2
	bl	_i2c_transfer
	cbz	w21, LBB0_2
; %bb.1:
	ldrb	w8, [sp, #2]
	lsl	w8, w8, #16
	ldrb	w9, [sp, #1]
	bfi	w8, w9, #8, #8
	ldrb	w9, [sp]
	orr	w21, w8, w9
	b	LBB0_3
LBB0_2:
	ldrb	w21, [sp]
LBB0_3:
Lloh6:
	adrp	x8, _debug@GOTPAGE
Lloh7:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	mov	x4, x19
	mov	x5, x21
	bl	_v4l2_dbg
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	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
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read:  reg 0x%03x=0x%08x\n"

	.no_dead_strip	_saa717x_read
.subsections_via_symbols
