	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmbus_index_xfer
_gmbus_index_xfer:                      ## @gmbus_index_xfer
	.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	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rsi), %ecx
	xorl	%eax, %eax
	movb	$1, %r12b
	cmpl	$2, %ecx
	je	LBB0_3
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_5
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	_GMBUS_SLAVE_INDEX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_GMBUS_CYCLE_INDEX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_5
LBB0_3:
	movq	_GMBUS_2BYTE_INDEX_EN@GOTPCREL(%rip), %rcx
	movq	8(%rbx), %rdx
	movl	(%rdx), %esi
	movl	4(%rdx), %edx
	orl	(%rcx), %edx
	shll	$8, %esi
	orl	%edx, %esi
	je	LBB0_5
## %bb.4:
	movq	_GMBUS5@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_WRITE_FW
	xorl	%r12d, %r12d
	xorl	%eax, %eax
LBB0_5:
	leaq	24(%rbx), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 40(%rbx)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_gmbus_xfer_read
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_gmbus_xfer_write
LBB0_8:
	movl	%eax, %ebx
	testb	%r12b, %r12b
	jne	LBB0_10
## %bb.9:
	movq	_GMBUS5@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_I915_WRITE_FW
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GMBUS_2BYTE_INDEX_EN,4,2       ## @GMBUS_2BYTE_INDEX_EN
	.comm	_GMBUS_CYCLE_INDEX,4,2          ## @GMBUS_CYCLE_INDEX
	.comm	_GMBUS_SLAVE_INDEX_SHIFT,4,2    ## @GMBUS_SLAVE_INDEX_SHIFT
	.comm	_GMBUS5,4,2                     ## @GMBUS5
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_gmbus_index_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmbus_index_xfer
_gmbus_index_xfer:                      ; @gmbus_index_xfer
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x1]
	cmp	w8, #2
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _GMBUS_CYCLE_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GMBUS_CYCLE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x21, #8]
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _GMBUS_SLAVE_INDEX_SHIFT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GMBUS_SLAVE_INDEX_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w3, w9, w8
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _GMBUS_2BYTE_INDEX_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GMBUS_2BYTE_INDEX_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x21, #8]
	ldp	w9, w10, [x9]
	orr	w8, w10, w8
	orr	w1, w8, w9, lsl #8
	cbz	w1, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _GMBUS5@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GMBUS5@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_I915_WRITE_FW
	mov	w22, #0
	mov	w3, #0
	b	LBB0_7
LBB0_5:
	mov	w3, #0
LBB0_6:
	mov	w22, #1
LBB0_7:
	add	x1, x21, #24
	ldr	w8, [x21, #40]
Lloh12:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mov	x0, x20
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	mov	x2, x19
	bl	_gmbus_xfer_read
	mov	x19, x0
	tbnz	w22, #0, LBB0_10
LBB0_9:
Lloh15:
	adrp	x8, _GMBUS5@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GMBUS5@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_I915_WRITE_FW
LBB0_10:
	mov	x0, x19
	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
LBB0_11:
	mov	x2, x3
	bl	_gmbus_xfer_write
	mov	x19, x0
	tbz	w22, #0, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GMBUS_2BYTE_INDEX_EN,4,2       ; @GMBUS_2BYTE_INDEX_EN
	.comm	_GMBUS_CYCLE_INDEX,4,2          ; @GMBUS_CYCLE_INDEX
	.comm	_GMBUS_SLAVE_INDEX_SHIFT,4,2    ; @GMBUS_SLAVE_INDEX_SHIFT
	.comm	_GMBUS5,4,2                     ; @GMBUS5
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_gmbus_index_xfer
.subsections_via_symbols
