	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_clkgate_enable           ## -- Begin function gk104_clkgate_enable
	.p2align	4, 0x90
_gk104_clkgate_enable:                  ## @gk104_clkgate_enable
	.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
	callq	_gk104_therm
	movq	8(%rax), %r13
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %r15
	movq	(%r13), %rsi
	movq	_NVKM_SUBDEV_NR@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rsi
	jne	LBB0_1
LBB0_5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movl	4(%rax), %edx
	movq	%r15, %rdi
	movl	$131720, %esi                   ## imm = 0x20288
	callq	_nvkm_wr32
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$131724, %esi                   ## imm = 0x2028C
	callq	_nvkm_wr32
	movq	(%r13), %rsi
	cmpq	(%r12), %rsi
	jne	LBB0_6
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%r13), %rbx
	movl	$131584, %r14d                  ## imm = 0x20200
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rsi
	addq	$16, %rbx
	cmpq	(%r12), %rsi
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_nvkm_device_subdev
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-8(%rbx), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	movl	$65280, %edx                    ## imm = 0xFF00
	movl	$17664, %ecx                    ## imm = 0x4500
	callq	_nvkm_mask
	jmp	LBB0_4
LBB0_6:
	addq	$16, %r13
	movl	$131584, %ebx                   ## imm = 0x20200
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r13), %rsi
	addq	$16, %r13
	cmpq	(%r12), %rsi
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_nvkm_device_subdev
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-8(%r13), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	movl	$255, %edx
	movl	$69, %ecx
	callq	_nvkm_mask
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_SUBDEV_NR,8,3             ## @NVKM_SUBDEV_NR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_clkgate_enable           ; -- Begin function gk104_clkgate_enable
	.p2align	2
_gk104_clkgate_enable:                  ; @gk104_clkgate_enable
	.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	w21, #512
	movk	w21, #2, lsl #16
	bl	_gk104_therm
	mov	x20, x0
	ldp	x23, x19, [x0, #8]
	ldr	x1, [x23]
Lloh0:
	adrp	x22, _NVKM_SUBDEV_NR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NVKM_SUBDEV_NR@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x1, x8
	b.ne	LBB0_3
LBB0_1:
	ldr	x8, [x20]
	ldr	w2, [x8, #4]
	mov	w24, #648
	movk	w24, #2, lsl #16
	mov	x0, x19
	mov	w1, #648
	movk	w1, #2, lsl #16
	bl	_nvkm_wr32
	ldr	x8, [x20]
	ldr	w2, [x8]
	orr	w1, w24, #0x4
	mov	x0, x19
	bl	_nvkm_wr32
	ldr	x1, [x23]
	ldr	x8, [x22]
	cmp	x1, x8
	b.ne	LBB0_7
LBB0_2:
	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
LBB0_3:
	add	x24, x23, #16
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x24], #16
	ldr	x8, [x22]
	cmp	x1, x8
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_nvkm_device_subdev
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	x8, [x24, #-8]
	add	x1, x8, x21
	mov	x0, x19
	mov	w2, #65280
	mov	w3, #17664
	bl	_nvkm_mask
	b	LBB0_4
LBB0_7:
	add	x20, x23, #16
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [x20], #16
	ldr	x8, [x22]
	cmp	x1, x8
	b.eq	LBB0_2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_nvkm_device_subdev
	cbz	w0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldur	x8, [x20, #-8]
	add	x1, x8, x21
	mov	x0, x19
	mov	w2, #255
	mov	w3, #69
	bl	_nvkm_mask
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_SUBDEV_NR,8,3             ; @NVKM_SUBDEV_NR
.subsections_via_symbols
