	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chromes_laptop_instantiate_i2c_device
_chromes_laptop_instantiate_i2c_device: ## @chromes_laptop_instantiate_i2c_device
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movzwl	(%rsi), %eax
	movw	%ax, -48(%rbp)
	movq	_I2C_CLIENT_END@GOTPCREL(%rip), %r13
	movzwl	(%r13), %eax
	movw	%ax, -46(%rbp)
	leaq	-48(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_i2c_new_probed_device
	movq	%rax, %rbx
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.1:
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.2:
	movzwl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_I2C_BOARD_INFO
	movw	%ax, -56(%rbp)
	movl	$0, -52(%rbp)
	movw	%r12w, -44(%rbp)
	movzwl	(%r13), %eax
	movw	%ax, -42(%rbp)
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_i2c_new_probed_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r12
	movl	(%r14), %esi
	movzwl	(%r15), %edx
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%r12, %rdi
	callq	_i2c_unregister_device
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_i2c_new_device
	movq	%rax, %rbx
LBB0_4:
	testq	%rbx, %rbx
	movl	(%r14), %esi
	movzwl	(%r15), %edx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdi
	cmoveq	%rax, %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_CLIENT_END,2,1             ## @I2C_CLIENT_END
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dummy"

L_.str.1:                               ## @.str.1
	.asciz	"%d-%02x is probed at %02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to register device %d-%02x\n"

L_.str.3:                               ## @.str.3
	.asciz	"added i2c device %d-%02x\n"

	.no_dead_strip	_chromes_laptop_instantiate_i2c_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chromes_laptop_instantiate_i2c_device
_chromes_laptop_instantiate_i2c_device: ; @chromes_laptop_instantiate_i2c_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldrh	w8, [x1]
	strh	w8, [sp, #28]
Lloh0:
	adrp	x23, _I2C_CLIENT_END@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2C_CLIENT_END@GOTPAGEOFF]
	ldrh	w8, [x23]
	strh	w8, [sp, #30]
	add	x2, sp, #28
	mov	x3, #0
	bl	_i2c_new_probed_device
	mov	x22, x0
	cbz	w21, LBB0_5
; %bb.1:
	cbnz	x22, LBB0_5
; %bb.2:
	ldrh	w1, [x19]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_I2C_BOARD_INFO
	strh	w0, [sp, #16]
	str	wzr, [sp, #20]
	strh	w21, [sp, #12]
	ldrh	w8, [x23]
	strh	w8, [sp, #14]
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x20
	mov	x3, #0
	bl	_i2c_new_probed_device
	cbz	x0, LBB0_4
; %bb.3:
	mov	x21, x0
	ldr	w1, [x20]
	ldrh	w2, [x19]
	ldr	w8, [x0]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	mov	x0, x21
	bl	_i2c_unregister_device
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_new_device
	mov	x22, x0
	b	LBB0_5
LBB0_4:
	mov	x22, #0
LBB0_5:
	ldr	w1, [x20]
	ldrh	w2, [x19]
Lloh6:
	adrp	x8, l_.str.3@PAGE
Lloh7:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x22, #0
	csel	x0, x9, x8, eq
	bl	_pr_debug
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_CLIENT_END,2,1             ; @I2C_CLIENT_END
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dummy"

l_.str.1:                               ; @.str.1
	.asciz	"%d-%02x is probed at %02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to register device %d-%02x\n"

l_.str.3:                               ; @.str.3
	.asciz	"added i2c device %d-%02x\n"

	.no_dead_strip	_chromes_laptop_instantiate_i2c_device
.subsections_via_symbols
