	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_powergate_sequence_power_up ## -- Begin function tegra_powergate_sequence_power_up
	.p2align	4, 0x90
_tegra_powergate_sequence_power_up:     ## @tegra_powergate_sequence_power_up
	.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	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_tegra124_pmc_get_sc
	movq	%rax, %r13
	movl	%r15d, %edi
	callq	_hwreset_assert
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_14
LBB0_2:
	movl	%r12d, %edi
	callq	_clk_stop
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
LBB0_4:
	movl	%r14d, %edi
	callq	_tegra_powergate_power_on
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
LBB0_6:
	movl	%r12d, %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
LBB0_8:
	movl	$20, %edi
	callq	_DELAY
	movl	%r14d, %edi
	callq	_tegra_powergate_remove_clamping
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_12
LBB0_10:
	movl	%r15d, %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
LBB0_12:
	movl	(%r13), %edi
	callq	_device_printf
	movl	%r12d, %edi
	callq	_clk_disable
LBB0_13:
	movl	%r15d, %edi
	callq	_hwreset_assert
	movl	%r14d, %edi
	callq	_tegra_powergate_power_off
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot assert reset\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot stop clock\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot power on powergate\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"Cannot remove clamping\n"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_powergate_sequence_power_up ; -- Begin function tegra_powergate_sequence_power_up
	.p2align	2
_tegra_powergate_sequence_power_up:     ; @tegra_powergate_sequence_power_up
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_tegra124_pmc_get_sc
	mov	x23, x0
	mov	x0, x20
	bl	_hwreset_assert
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x23]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
	b	LBB0_14
LBB0_2:
	mov	x0, x22
	bl	_clk_stop
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	b	LBB0_13
LBB0_4:
	mov	x0, x19
	bl	_tegra_powergate_power_on
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	ldr	w0, [x23]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	b	LBB0_13
LBB0_6:
	mov	x0, x22
	bl	_clk_enable
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
	ldr	w0, [x23]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_device_printf
	b	LBB0_13
LBB0_8:
	mov	w0, #20
	bl	_DELAY
	mov	x0, x19
	bl	_tegra_powergate_remove_clamping
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_hwreset_deassert
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.11:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_12:
	ldr	w0, [x23]
	bl	_device_printf
	mov	x0, x22
	bl	_clk_disable
LBB0_13:
	mov	x0, x20
	bl	_hwreset_assert
	mov	x0, x19
	bl	_tegra_powergate_power_off
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot assert reset\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot stop clock\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot power on powergate\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"Cannot remove clamping\n"

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

.subsections_via_symbols
