	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_attach
_i2c_attach:                            ## @i2c_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 32(%rax)
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mtx_init
	movq	_i2c_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 28(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 24(%rbx)
	movq	_I2C_IBIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IBIC_BIIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_WRITE1
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	$-1, %edx
	callq	_device_add_child
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	%r14d, %edi
	callq	_bus_generic_attach
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	%rbx, %rdi
	callq	_mtx_destroy
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.comm	_i2c_spec,4,2                   ## @i2c_spec
L_.str.1:                               ## @.str.1
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I2C_IBIC,4,2                   ## @I2C_IBIC
	.comm	_IBIC_BIIE,4,2                  ## @IBIC_BIIE
L_.str.2:                               ## @.str.2
	.asciz	"iicbus"

L_.str.3:                               ## @.str.3
	.asciz	"could not add iicbus child"

	.no_dead_strip	_i2c_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_attach
_i2c_attach:                            ; @i2c_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #32]
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh0:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mtx_init
Lloh5:
	adrp	x8, _i2c_spec@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i2c_spec@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x2, [x20, #16]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_3
; %bb.1:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_2:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x20, #28]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	w0, [x20, #24]
Lloh13:
	adrp	x8, _I2C_IBIC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I2C_IBIC@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _IBIC_BIIE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IBIC_BIIE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE1
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	str	x0, [x20, #8]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_bus_generic_attach
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	x0, x20
	bl	_mtx_destroy
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.comm	_i2c_spec,4,2                   ; @i2c_spec
l_.str.1:                               ; @.str.1
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I2C_IBIC,4,2                   ; @I2C_IBIC
	.comm	_IBIC_BIIE,4,2                  ; @IBIC_BIIE
l_.str.2:                               ; @.str.2
	.asciz	"iicbus"

l_.str.3:                               ; @.str.3
	.asciz	"could not add iicbus child"

	.no_dead_strip	_i2c_attach
.subsections_via_symbols
