	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra124_car_attach
_tegra124_car_attach:                   ## @tegra124_car_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
	subq	$16, %rsp
	.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, %r15
	movl	%ebx, 16(%rax)
	leaq	12(%rax), %r12
	movl	%ebx, %edi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ofw_bus_search_compatible
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	$0, -36(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-36(%rbp), %rdx
	movl	%ebx, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movl	%ebx, %edi
	callq	_register_clocks
	movl	%ebx, %edi
	callq	_hwreset_register_ofw_provider
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movl	(%r12), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_bus_release_resource
LBB0_3:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.comm	_compat_data,4,2                ## @compat_data
	.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 allocate memory resource\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_tegra124_car_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra124_car_attach
_tegra124_car_attach:                   ; @tegra124_car_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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #16]
	add	x21, x0, #12
	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]
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
Lloh3:
	adrp	x8, _compat_data@GOTPAGE
Lloh4:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	w8, [x0]
	str	w8, [x20, #8]
	str	wzr, [sp, #12]
Lloh6:
	adrp	x22, _SYS_RES_MEMORY@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SYS_RES_MEMORY@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_register_clocks
	mov	x0, x19
	bl	_hwreset_register_ofw_provider
	mov	w21, #0
	b	LBB0_4
LBB0_2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	ldr	x3, [x20]
	cbz	x3, LBB0_4
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_bus_release_resource
LBB0_4:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.comm	_compat_data,4,2                ; @compat_data
	.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 allocate memory resource\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_tegra124_car_attach
.subsections_via_symbols
