	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_clk_mipi_set_gate
_aw_clk_mipi_set_gate:                  ## @aw_clk_mipi_set_gate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_clknode_get_softc
	movq	%rax, %r14
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_dprintf
	movq	%rbx, %rdi
	callq	_DEVICE_LOCK
	movl	4(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_READ4
	movb	(%r14), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movl	-28(%rbp), %edx
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	orl	%eax, %edx
	movq	_LDO1_EN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edx
	movq	_LDO2_EN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edx
	jmp	LBB0_3
LBB0_2:
	movq	_LDO1_EN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movq	_LDO2_EN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	notl	%eax
	andl	%eax, %edx
LBB0_3:
	movl	%edx, -28(%rbp)
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	movq	%rbx, %rdi
	callq	_DEVICE_UNLOCK
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sabling gate\n"

L_.str.1:                               ## @.str.1
	.asciz	"En"

L_.str.2:                               ## @.str.2
	.asciz	"Dis"

	.comm	_LDO1_EN_SHIFT,4,2              ## @LDO1_EN_SHIFT
	.comm	_LDO2_EN_SHIFT,4,2              ## @LDO2_EN_SHIFT
	.no_dead_strip	_aw_clk_mipi_set_gate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_clk_mipi_set_gate
_aw_clk_mipi_set_gate:                  ; @aw_clk_mipi_set_gate
	.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	x21, x1
	mov	x19, x0
	bl	_clknode_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x1, x9, x8, eq
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintf
	mov	x0, x19
	bl	_DEVICE_LOCK
	ldr	w1, [x20, #4]
	add	x2, sp, #12
	mov	x0, x19
	bl	_READ4
	ldr	w9, [x20]
	mov	w8, #1
	lsl	w10, w8, w9
	ldr	w9, [sp, #12]
	cbz	w21, LBB0_2
; %bb.1:
	orr	w9, w9, w10
Lloh6:
	adrp	x10, _LDO1_EN_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _LDO1_EN_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w10, w8, w10
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _LDO2_EN_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _LDO2_EN_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w2, w8, w9
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x11, _LDO1_EN_SHIFT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _LDO1_EN_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	lsl	w11, w8, w11
	orr	w10, w10, w11
Lloh15:
	adrp	x11, _LDO2_EN_SHIFT@GOTPAGE
Lloh16:
	ldr	x11, [x11, _LDO2_EN_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	lsl	w8, w8, w11
	orr	w8, w10, w8
	bic	w2, w9, w8
LBB0_3:
	str	w2, [sp, #12]
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_WRITE4
	mov	x0, x19
	bl	_DEVICE_UNLOCK
	mov	w0, #0
	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	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sabling gate\n"

l_.str.1:                               ; @.str.1
	.asciz	"En"

l_.str.2:                               ; @.str.2
	.asciz	"Dis"

	.comm	_LDO1_EN_SHIFT,4,2              ; @LDO1_EN_SHIFT
	.comm	_LDO2_EN_SHIFT,4,2              ; @LDO2_EN_SHIFT
	.no_dead_strip	_aw_clk_mipi_set_gate
.subsections_via_symbols
