	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epic_attach
_epic_attach:                           ## @epic_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_epic_res_spec@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	16(%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
	xorl	%eax, %eax
	callq	_device_printf
	movl	(%r15), %esi
	movl	16(%r14), %edx
	movl	%ebx, %edi
	callq	_bus_release_resources
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_2:
	movq	%r14, %rdi
	callq	_EPIC_LOCK_INIT
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_EPIC_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_EPIC_FW_LED_READ
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_4:
	movq	_epic_led_alert@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rsi
	callq	_led_create
	movq	%rax, 8(%r14)
	movq	_epic_led_power@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rsi
	callq	_led_create
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_epic_res_spec,4,2              ## @epic_res_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.1:                               ## @.str.1
	.asciz	"version 0x%x\n"

	.comm	_EPIC_FW_VERSION,4,2            ## @EPIC_FW_VERSION
	.comm	_epic_led_alert,4,2             ## @epic_led_alert
L_.str.2:                               ## @.str.2
	.asciz	"alert"

	.comm	_epic_led_power,4,2             ## @epic_led_power
L_.str.3:                               ## @.str.3
	.asciz	"power"

	.no_dead_strip	_epic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epic_attach
_epic_attach:                           ; @epic_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x21, _epic_res_spec@GOTPAGE
Lloh1:
	ldr	x21, [x21, _epic_res_spec@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	w2, [x0, #16]
	mov	x0, x20
	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, x20
	bl	_device_printf
	ldr	w1, [x21]
	ldr	w2, [x19, #16]
	mov	x0, x20
	bl	_bus_release_resources
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_EPIC_LOCK_INIT
Lloh7:
	adrp	x8, _bootverbose@GOTPAGE
Lloh8:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _EPIC_FW_VERSION@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPIC_FW_VERSION@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_EPIC_FW_LED_READ
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_4:
Lloh15:
	adrp	x8, _epic_led_alert@GOTPAGE
Lloh16:
	ldr	x8, [x8, _epic_led_alert@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_led_create
	str	x0, [x19, #8]
Lloh20:
	adrp	x8, _epic_led_power@GOTPAGE
Lloh21:
	ldr	x8, [x8, _epic_led_power@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x2, l_.str.3@PAGE
Lloh24:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_led_create
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_epic_res_spec,4,2              ; @epic_res_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.1:                               ; @.str.1
	.asciz	"version 0x%x\n"

	.comm	_EPIC_FW_VERSION,4,2            ; @EPIC_FW_VERSION
	.comm	_epic_led_alert,4,2             ; @epic_led_alert
l_.str.2:                               ; @.str.2
	.asciz	"alert"

	.comm	_epic_led_power,4,2             ; @epic_led_power
l_.str.3:                               ; @.str.3
	.asciz	"power"

	.no_dead_strip	_epic_attach
.subsections_via_symbols
