	.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	%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
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 12(%rax)
	leaq	40(%rax), %rdx
	movq	$0, 40(%rax)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	$-1, %edx
	callq	_device_add_child
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	12(%rbx), %edi
	callq	_device_get_sysctl_ctx
	movl	%eax, %r15d
	movl	12(%rbx), %edi
	callq	_device_get_sysctl_tree
	movl	%eax, %edi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CTLFLAG_RWTUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	16(%rbx), %r9
	leaq	L_.str.4(%rip), %r10
	leaq	L_.str.3(%rip), %rcx
	movl	%r15d, %edi
	movl	%eax, %esi
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_INT
	addq	$16, %rsp
	movl	12(%rbx), %edi
	callq	_ofw_bus_get_node
	movl	%eax, %r15d
	leaq	8(%rbx), %r12
	leaq	L_.str.5(%rip), %rdx
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%r12, %rcx
	callq	_gpio_pin_get_by_ofw_property
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %r13
	addq	$4, %r13
	leaq	L_.str.6(%rip), %rdx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	%r13, %rcx
	callq	_gpio_pin_get_by_ofw_property
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movl	(%r12), %edi
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gpio_pin_setflags
	movl	(%r13), %edi
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gpio_pin_setflags
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_gpio_pin_set_active
	movl	(%r13), %edi
	movl	$1, %esi
	callq	_gpio_pin_set_active
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rdx
	leaq	-68(%rbp), %rcx
	movl	%r15d, %edi
	callq	_ofw_bus_find_string_index
	testl	%eax, %eax
	je	LBB0_8
LBB0_11:
	movq	_bus_generic_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_config_intrhook_oneshot
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	-68(%rbp), %ecx
	leaq	L_.str.9(%rip), %rdx
	leaq	-64(%rbp), %rdi
	movl	$16, %esi
	callq	_snprintf
	leaq	L_.str.10(%rip), %rsi
	movl	%r15d, %edi
	callq	_OF_hasprop
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	-64(%rbp), %rsi
	movl	%r15d, %edi
	callq	_OF_hasprop
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	-68(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_11
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources"

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

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

	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
L_.str.3:                               ## @.str.3
	.asciz	"debug"

	.comm	_CTLFLAG_RWTUN,4,2              ## @CTLFLAG_RWTUN
L_.str.4:                               ## @.str.4
	.asciz	"Enable debug; 1=reads/writes, 2=add starts/stops"

L_.str.5:                               ## @.str.5
	.asciz	"scl-gpios"

L_.str.6:                               ## @.str.6
	.asciz	"sda-gpios"

	.comm	_GPIO_PIN_OUTPUT,4,2            ## @GPIO_PIN_OUTPUT
L_.str.7:                               ## @.str.7
	.asciz	"pinctrl-names"

L_.str.8:                               ## @.str.8
	.asciz	"gpio"

L_.str.9:                               ## @.str.9
	.asciz	"pinctrl-%d"

L_.str.10:                              ## @.str.10
	.asciz	"pinctrl-0"

	.comm	_bus_generic_attach,8,3         ## @bus_generic_attach
	.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:
	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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #12]
	mov	x2, x0
	str	xzr, [x2, #40]!
Lloh3:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #32]
	cbz	x0, LBB0_6
; %bb.1:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	str	x0, [x20, #24]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w0, [x20, #12]
	bl	_device_get_sysctl_ctx
	mov	x21, x0
	ldr	w0, [x20, #12]
	bl	_device_get_sysctl_tree
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
Lloh11:
	adrp	x8, _OID_AUTO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OID_AUTO@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _CTLFLAG_RWTUN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CTLFLAG_RWTUN@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	add	x5, x20, #16
Lloh17:
	adrp	x3, l_.str.3@PAGE
Lloh18:
	add	x3, x3, l_.str.3@PAGEOFF
Lloh19:
	adrp	x7, l_.str.4@PAGE
Lloh20:
	add	x7, x7, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	w6, #0
	bl	_SYSCTL_ADD_INT
	ldr	w0, [x20, #12]
	bl	_ofw_bus_get_node
	mov	x21, x0
	add	x22, x20, #8
Lloh21:
	adrp	x2, l_.str.5@PAGE
Lloh22:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_gpio_pin_get_by_ofw_property
	cbnz	w0, LBB0_5
; %bb.3:
	add	x23, x20, #4
Lloh23:
	adrp	x2, l_.str.6@PAGE
Lloh24:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	bl	_gpio_pin_get_by_ofw_property
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x22]
Lloh25:
	adrp	x24, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh26:
	ldr	x24, [x24, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_gpio_pin_setflags
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_gpio_pin_setflags
	ldr	w0, [x22]
	mov	w1, #1
	bl	_gpio_pin_set_active
	ldr	w0, [x23]
	mov	w1, #1
	bl	_gpio_pin_set_active
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh29:
	adrp	x2, l_.str.8@PAGE
Lloh30:
	add	x2, x2, l_.str.8@PAGEOFF
	add	x3, sp, #4
	mov	x0, x21
	bl	_ofw_bus_find_string_index
	cbz	w0, LBB0_11
LBB0_5:
Lloh31:
	adrp	x8, _bus_generic_attach@GOTPAGE
Lloh32:
	ldr	x8, [x8, _bus_generic_attach@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_config_intrhook_oneshot
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_device_printf
Lloh38:
	adrp	x8, _ENXIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
LBB0_9:
	ldr	x8, [sp, #24]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.10:
	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
LBB0_11:
	ldr	w3, [sp, #4]
Lloh44:
	adrp	x2, l_.str.9@PAGE
Lloh45:
	add	x2, x2, l_.str.9@PAGEOFF
	add	x0, sp, #8
	mov	w1, #16
	bl	_snprintf
Lloh46:
	adrp	x1, l_.str.10@PAGE
Lloh47:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x21
	bl	_OF_hasprop
	cbz	x0, LBB0_5
; %bb.12:
	add	x1, sp, #8
	mov	x0, x21
	bl	_OF_hasprop
	cbz	x0, LBB0_5
; %bb.13:
	ldr	w8, [sp, #4]
	str	w8, [x20]
	b	LBB0_5
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources"

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

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

	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
l_.str.3:                               ; @.str.3
	.asciz	"debug"

	.comm	_CTLFLAG_RWTUN,4,2              ; @CTLFLAG_RWTUN
l_.str.4:                               ; @.str.4
	.asciz	"Enable debug; 1=reads/writes, 2=add starts/stops"

l_.str.5:                               ; @.str.5
	.asciz	"scl-gpios"

l_.str.6:                               ; @.str.6
	.asciz	"sda-gpios"

	.comm	_GPIO_PIN_OUTPUT,4,2            ; @GPIO_PIN_OUTPUT
l_.str.7:                               ; @.str.7
	.asciz	"pinctrl-names"

l_.str.8:                               ; @.str.8
	.asciz	"gpio"

l_.str.9:                               ; @.str.9
	.asciz	"pinctrl-%d"

l_.str.10:                              ; @.str.10
	.asciz	"pinctrl-0"

	.comm	_bus_generic_attach,8,3         ; @bus_generic_attach
	.no_dead_strip	_i2c_attach
.subsections_via_symbols
