	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_powergate_power_on       ## -- Begin function tegra_powergate_power_on
	.p2align	4, 0x90
_tegra_powergate_power_on:              ## @tegra_powergate_power_on
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_tegra124_pmc_get_sc
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_tegra124_pmc_set_powergate
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_1
## %bb.6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_5
LBB0_1:
	movl	$101, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_tegra_powergate_is_powered
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_DELAY
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_2
## %bb.4:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot set powergate: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timeout when waiting on power up\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_powergate_power_on       ; -- Begin function tegra_powergate_power_on
	.p2align	2
_tegra_powergate_power_on:              ; @tegra_powergate_power_on
	.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	_tegra124_pmc_get_sc
	mov	x21, x0
	mov	x1, x20
	mov	w2, #1
	bl	_tegra124_pmc_set_powergate
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	mov	w22, #101
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_tegra_powergate_is_powered
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_DELAY
	sub	w22, w22, #1
	cmp	w22, #1
	b.hi	LBB0_3
; %bb.5:
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	bl	_device_printf
LBB0_7:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot set powergate: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timeout when waiting on power up\n"

.subsections_via_symbols
