	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt312_i2c_gate_ctrl
_mt312_i2c_gate_ctrl:                   ## @mt312_i2c_gate_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	movl	$0, -20(%rbp)
	xorl	%eax, %eax
	cmpl	$128, (%rbx)
	jne	LBB0_3
## %bb.1:
	movq	_GPP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_mt312_readreg
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	$128, %eax
	andl	-20(%rbp), %eax
LBB0_3:
	xorl	%edx, %edx
	testl	%r14d, %r14d
	setne	%dl
	shll	$6, %edx
	orl	%eax, %edx
	movl	%edx, -20(%rbp)
	movq	_GPP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mt312_writereg
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPP_CTRL,4,2                   ## @GPP_CTRL
	.no_dead_strip	_mt312_i2c_gate_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt312_i2c_gate_ctrl
_mt312_i2c_gate_ctrl:                   ; @mt312_i2c_gate_ctrl
	.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, x1
	mov	w8, #0
	ldr	x19, [x0]
	str	wzr, [sp, #12]
	ldr	w9, [x19]
Lloh0:
	adrp	x21, _GPP_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GPP_CTRL@GOTPAGEOFF]
	cmp	w9, #128
	b.ne	LBB0_3
; %bb.1:
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mt312_readreg
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w8, [sp, #12]
	and	w8, w8, #0x80
LBB0_3:
	cmp	w20, #0
	cset	w9, ne
	orr	w2, w8, w9, lsl #6
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mt312_writereg
LBB0_4:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GPP_CTRL,4,2                   ; @GPP_CTRL
	.no_dead_strip	_mt312_i2c_gate_ctrl
.subsections_via_symbols
