	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_efuse_attach
_tegra_efuse_attach:                    ## @tegra_efuse_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	%rax, %r14
	movl	%r12d, 28(%rax)
	movl	%r12d, %edi
	callq	_ofw_bus_get_node
	movl	$0, -44(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r12d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	leaq	16(%rbx), %r13
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %edi
	xorl	%esi, %esi
	movq	%r13, %rcx
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_2
LBB0_11:
	movq	(%r13), %rdi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movl	%r12d, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_device_printf
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r13
LBB0_2:
	movq	_dev_sc@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_clk_release
LBB0_4:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_hwreset_release
LBB0_6:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.7:
	movl	(%r13), %esi
	movl	%r12d, %edi
	xorl	%edx, %edx
	callq	_bus_release_resource
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	28(%r14), %edi
	addq	$8, %rbx
	leaq	L_.str.1(%rip), %rdx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_hwreset_get_by_ofw_name
	testl	%eax, %eax
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r13
	je	LBB0_16
## %bb.14:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movl	%r12d, %edi
	jmp	LBB0_15
LBB0_16:
	movq	(%rbx), %rdi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r15d
	movl	28(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_15:
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_2
LBB0_18:
	movq	_TEGRA124_FUSE_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_tegra_sku_info@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_tegra124_init_speedo
	movq	_dev_sc@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	callq	_tegra_efuse_dump_sku
LBB0_20:
	movl	%r12d, %edi
	callq	_bus_generic_attach
	movl	%eax, %r15d
	jmp	LBB0_21
	.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	"Cannot map registers.\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"Cannot get fuse clock: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot enable clock: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Cannot get fuse reset\n"

L_.str.5:                               ## @.str.5
	.asciz	"Cannot clear reset\n"

	.comm	_TEGRA124_FUSE_BEGIN,4,2        ## @TEGRA124_FUSE_BEGIN
	.comm	_tegra_sku_info,4,2             ## @tegra_sku_info
	.comm	_dev_sc,8,3                     ## @dev_sc
	.comm	_bootverbose,8,3                ## @bootverbose
	.no_dead_strip	_tegra_efuse_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_efuse_attach
_tegra_efuse_attach:                    ; @tegra_efuse_attach
	.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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #28]
	mov	x0, x19
	bl	_ofw_bus_get_node
	str	wzr, [sp, #12]
Lloh0:
	adrp	x23, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SYS_RES_MEMORY@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20]
	cbz	x0, LBB0_4
; %bb.1:
	add	x22, x20, #16
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x22
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_device_printf
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x22]
	bl	_clk_enable
	cbz	w0, LBB0_14
; %bb.6:
	mov	x21, x0
	str	x21, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_device_printf
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_7:
Lloh16:
	adrp	x8, _dev_sc@GOTPAGE
Lloh17:
	ldr	x8, [x8, _dev_sc@GOTPAGEOFF]
Lloh18:
	str	xzr, [x8]
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_clk_release
LBB0_9:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_hwreset_release
LBB0_11:
	ldr	x3, [x20]
	cbz	x3, LBB0_13
; %bb.12:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_bus_release_resource
LBB0_13:
	mov	x0, x21
	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
LBB0_14:
	ldr	w0, [x20, #28]
	add	x22, x20, #8
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #0
	mov	x3, x22
	bl	_hwreset_get_by_ofw_name
	cbz	w0, LBB0_16
; %bb.15:
	mov	x21, x0
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_3
LBB0_16:
	ldr	x0, [x22]
	bl	_hwreset_deassert
	cbz	w0, LBB0_18
; %bb.17:
	mov	x21, x0
	ldr	w0, [x20, #28]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_device_printf
	b	LBB0_7
LBB0_18:
Lloh25:
	adrp	x8, _TEGRA124_FUSE_BEGIN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TEGRA124_FUSE_BEGIN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x20, #24]
Lloh28:
	adrp	x1, _tegra_sku_info@GOTPAGE
Lloh29:
	ldr	x1, [x1, _tegra_sku_info@GOTPAGEOFF]
	mov	x0, x20
	bl	_tegra124_init_speedo
Lloh30:
	adrp	x8, _dev_sc@GOTPAGE
Lloh31:
	ldr	x8, [x8, _dev_sc@GOTPAGEOFF]
Lloh32:
	str	x20, [x8]
Lloh33:
	adrp	x8, _bootverbose@GOTPAGE
Lloh34:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	bl	_tegra_efuse_dump_sku
LBB0_20:
	mov	x0, x19
	bl	_bus_generic_attach
	mov	x21, x0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.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	"Cannot map registers.\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"Cannot get fuse clock: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot enable clock: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Cannot get fuse reset\n"

l_.str.5:                               ; @.str.5
	.asciz	"Cannot clear reset\n"

	.comm	_TEGRA124_FUSE_BEGIN,4,2        ; @TEGRA124_FUSE_BEGIN
	.comm	_tegra_sku_info,4,2             ; @tegra_sku_info
	.comm	_dev_sc,8,3                     ; @dev_sc
	.comm	_bootverbose,8,3                ; @bootverbose
	.no_dead_strip	_tegra_efuse_attach
.subsections_via_symbols
