	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mt9v111_addr_space_select
___mt9v111_addr_space_select:           ## @__mt9v111_addr_space_select
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_i2c_get_clientdata
	movq	%rax, %rdi
	callq	_sd_to_mt9v111
	movq	%rax, %r14
	xorl	%eax, %eax
	cmpq	%r15, (%r14)
	je	LBB0_6
## %bb.1:
	movq	_MT9V111_R01_ADDR_SPACE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	___mt9v111_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	___mt9v111_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	cmpq	%r15, -40(%rbp)
	jne	LBB0_4
## %bb.5:
	movq	%r15, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9V111_R01_ADDR_SPACE,4,2     ## @MT9V111_R01_ADDR_SPACE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	___mt9v111_addr_space_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mt9v111_addr_space_select
___mt9v111_addr_space_select:           ; @__mt9v111_addr_space_select
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	bl	_i2c_get_clientdata
	bl	_sd_to_mt9v111
	ldr	x8, [x0]
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x20, x0
Lloh0:
	adrp	x22, _MT9V111_R01_ADDR_SPACE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MT9V111_R01_ADDR_SPACE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	mov	x2, x19
	bl	___mt9v111_write
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	bl	___mt9v111_read
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	x8, [sp, #8]
	cmp	x8, x19
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	str	x19, [x20]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9V111_R01_ADDR_SPACE,4,2     ; @MT9V111_R01_ADDR_SPACE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	___mt9v111_addr_space_select
.subsections_via_symbols
