	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chip_read2
_chip_read2:                            ## @chip_read2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_v4l2_get_subdevdata
	movl	4(%rax), %ecx
	movl	%ecx, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$1, -64(%rbp)
	leaq	-82(%rbp), %rdx
	movl	%edx, -60(%rbp)
	movl	%ecx, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	movl	$1, -40(%rbp)
	leaq	-81(%rbp), %rcx
	movl	%ecx, -36(%rbp)
	movb	%r14b, -82(%rbp)
	movl	(%rax), %edi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	-81(%rbp), %r9d
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	movl	%r14d, %r8d
	callq	_v4l2_dbg
	movzbl	-81(%rbp), %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_v4l2_warn
	movl	$-1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error (read2)\n"

	.comm	_debug,4,2                      ## @debug
L_.str.1:                               ## @.str.1
	.asciz	"chip_read2: reg%d=0x%x\n"

	.no_dead_strip	_chip_read2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chip_read2
_chip_read2:                            ; @chip_read2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_v4l2_get_subdevdata
	ldr	w8, [x0, #4]
	str	w8, [sp, #8]
	str	xzr, [sp, #16]
	mov	w9, #1
	add	x10, sp, #7
	stp	w9, w10, [sp, #24]
	str	w8, [sp, #32]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	str	x8, [sp, #40]
	add	x8, sp, #6
	stp	w9, w8, [sp, #48]
	strb	w20, [sp, #7]
	ldr	w0, [x0]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _debug@GOTPAGE
Lloh7:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldrb	w5, [sp, #6]
Lloh9:
	adrp	x3, l_.str.1@PAGE
Lloh10:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x20
	bl	_v4l2_dbg
	ldrb	w0, [sp, #6]
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_v4l2_warn
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error (read2)\n"

	.comm	_debug,4,2                      ; @debug
l_.str.1:                               ; @.str.1
	.asciz	"chip_read2: reg%d=0x%x\n"

	.no_dead_strip	_chip_read2
.subsections_via_symbols
