	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stb0899_i2c_gate_ctrl          ## -- Begin function stb0899_i2c_gate_ctrl
	.p2align	4, 0x90
_stb0899_i2c_gate_ctrl:                 ## @stb0899_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %r14
	movq	_STB0899_I2CRPT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_stb0899_read_reg
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rcx
	movl	$1, %edx
	callq	_dprintk
	movq	_STB0899_I2CTON@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edx
	callq	_dprintk
	movq	_STB0899_I2CTON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_4:
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_stb0899_write_reg
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_6
LBB0_5:
	movl	(%r14), %edi
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %edx
	callq	_dprintk
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_I2CRPT,4,2             ## @STB0899_I2CRPT
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling I2C Repeater ..."

	.comm	_STB0899_I2CTON,4,2             ## @STB0899_I2CTON
L_.str.1:                               ## @.str.1
	.asciz	"Disabling I2C Repeater ..."

	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"I2C Repeater control failed"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stb0899_i2c_gate_ctrl          ; -- Begin function stb0899_i2c_gate_ctrl
	.p2align	2
_stb0899_i2c_gate_ctrl:                 ; @stb0899_i2c_gate_ctrl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _STB0899_I2CRPT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STB0899_I2CRPT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stb0899_read_reg
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	cbz	w21, LBB0_3
; %bb.2:
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #1
	bl	_dprintk
Lloh7:
	adrp	x8, _STB0899_I2CTON@GOTPAGE
Lloh8:
	ldr	x8, [x8, _STB0899_I2CTON@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w2, w8, w20
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_dprintk
Lloh12:
	adrp	x8, _STB0899_I2CTON@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STB0899_I2CTON@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	bic	w2, w20, w8
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stb0899_write_reg
	tbnz	x0, #63, LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x3, l_.str.2@PAGE
Lloh19:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #1
	bl	_dprintk
Lloh20:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_I2CRPT,4,2             ; @STB0899_I2CRPT
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling I2C Repeater ..."

	.comm	_STB0899_I2CTON,4,2             ; @STB0899_I2CTON
l_.str.1:                               ; @.str.1
	.asciz	"Disabling I2C Repeater ..."

	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"I2C Repeater control failed"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
.subsections_via_symbols
