	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9035_add_i2c_dev
_af9035_add_i2c_dev:                    ## @af9035_add_i2c_dev
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_d_to_priv
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r15
	movq	%r14, -72(%rbp)
	movl	$0, -64(%rbp)
	movl	%r13d, -60(%rbp)
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_strscpy
	movq	_AF9035_I2C_CLIENT_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_2
## %bb.4:
	movl	%eax, %ebx
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	cmpl	(%r14), %ebx
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	callq	_request_module
	leaq	-72(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_i2c_new_device
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %r12
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	(%rax), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_10
## %bb.13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	%r12, (%rax,%rcx,8)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	%r12, %rdi
	callq	_i2c_unregister_device
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
LBB0_12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.comm	_AF9035_I2C_CLIENT_MAX,4,2      ## @AF9035_I2C_CLIENT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"num=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"I2C client out of index\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9035_add_i2c_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9035_add_i2c_dev
_af9035_add_i2c_dev:                    ; @af9035_add_i2c_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_d_to_priv
	mov	x20, x0
	ldr	x19, [x19]
	str	x22, [sp]
	stp	wzr, w23, [sp, #8]
Lloh0:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x24
	bl	_strscpy
Lloh3:
	adrp	x23, _AF9035_I2C_CLIENT_MAX@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AF9035_I2C_CLIENT_MAX@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	ldr	x9, [x20]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x22, lsl #3]
	cbz	x10, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	cmp	x8, x22
	b.ne	LBB0_2
; %bb.4:
	mov	x22, x8
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.7:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_13
LBB0_8:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	w1, #0
	bl	_request_module
	mov	x1, sp
	mov	x0, x21
	bl	_i2c_new_device
	cbz	x0, LBB0_13
; %bb.9:
	mov	x21, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_13
; %bb.10:
	ldr	w0, [x8]
	bl	_try_module_get
	cbz	w0, LBB0_12
; %bb.11:
	mov	w23, #0
	ldr	x8, [x20]
	str	x21, [x8, w22, uxtw #3]
	b	LBB0_14
LBB0_12:
	mov	x0, x21
	bl	_i2c_unregister_device
LBB0_13:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w23, w8
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_dbg
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.comm	_AF9035_I2C_CLIENT_MAX,4,2      ; @AF9035_I2C_CLIENT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"num=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"I2C client out of index\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9035_add_i2c_dev
.subsections_via_symbols
