	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_iic_attach
_aml8726_iic_attach:                    ## @aml8726_iic_attach
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 16(%rax)
	movq	_aml8726_iic_spec@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_8
LBB0_2:
	movq	%r14, %rdi
	callq	_AML_I2C_LOCK_INIT
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	$-1, %edx
	callq	_device_add_child
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	callq	_device_probe_and_attach
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_7:
	movq	%r14, %rdi
	callq	_AML_I2C_LOCK_DESTROY
	movl	(%r12), %esi
	movl	(%r14), %edx
	movl	%ebx, %edi
	callq	_bus_release_resources
	jmp	LBB0_8
LBB0_5:
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aml8726_iic_spec,4,2           ## @aml8726_iic_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can not allocate resources for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"iicbb"

L_.str.2:                               ## @.str.2
	.asciz	"could not add iicbb\n"

L_.str.3:                               ## @.str.3
	.asciz	"could not attach iicbb\n"

	.no_dead_strip	_aml8726_iic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_iic_attach
_aml8726_iic_attach:                    ; @aml8726_iic_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #16]
Lloh0:
	adrp	x22, _aml8726_iic_spec@GOTPAGE
Lloh1:
	ldr	x22, [x22, _aml8726_iic_spec@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w2, [x0]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_2:
	mov	x0, x20
	bl	_AML_I2C_LOCK_INIT
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	str	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.3:
	bl	_device_probe_and_attach
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
LBB0_6:
	mov	x0, x20
	bl	_AML_I2C_LOCK_DESTROY
	ldr	w1, [x22]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_bus_release_resources
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_aml8726_iic_spec,4,2           ; @aml8726_iic_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can not allocate resources for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"iicbb"

l_.str.2:                               ; @.str.2
	.asciz	"could not add iicbb\n"

l_.str.3:                               ; @.str.3
	.asciz	"could not attach iicbb\n"

	.no_dead_strip	_aml8726_iic_attach
.subsections_via_symbols
