	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmbus_xfer_index_read
_gmbus_xfer_index_read:                 ## @gmbus_xfer_index_read
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	xorl	%edx, %edx
	cmpl	$2, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	_GMBUS_SLAVE_INDEX_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_GMBUS_CYCLE_INDEX@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_3
LBB0_4:
	movq	_GMBUS_2BYTE_INDEX_EN@GOTPCREL(%rip), %rax
	movq	8(%rbx), %rcx
	movl	(%rcx), %esi
	movl	4(%rcx), %ecx
	orl	(%rax), %ecx
	shll	$8, %esi
	orl	%ecx, %esi
	je	LBB0_3
## %bb.5:
	movslq	(%r14), %r15
	movq	_GMBUS5@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	%r15, %rdi
	callq	_I915_WRITE
	addq	$16, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_gmbus_xfer_read
	movl	%eax, %ebx
	addq	(%r12), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	addq	$16, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gmbus_xfer_read                ## TAILCALL
	.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,8,3                     ## @GMBUS5
	.no_dead_strip	_gmbus_xfer_index_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmbus_xfer_index_read
_gmbus_xfer_index_read:                 ; @gmbus_xfer_index_read
	.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	x20, x1
	mov	x19, 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, [x20, #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	w2, 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, [x20, #8]
	ldp	w9, w10, [x9]
	orr	w8, w10, w8
	orr	w1, w8, w9, lsl #8
	cbz	w1, LBB0_5
; %bb.4:
	ldrsw	x21, [x19]
Lloh9:
	adrp	x22, _GMBUS5@GOTPAGE
Lloh10:
	ldr	x22, [x22, _GMBUS5@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x0, x8, x21
	bl	_I915_WRITE
	add	x1, x20, #16
	mov	x0, x19
	mov	w2, #0
	bl	_gmbus_xfer_read
	mov	x19, x0
	ldr	x8, [x22]
	add	x0, x8, x21
	mov	w1, #0
	bl	_I915_WRITE
	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_5:
	mov	w2, #0
LBB0_6:
	add	x1, x20, #16
	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
	b	_gmbus_xfer_read
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.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,8,3                     ; @GMBUS5
	.no_dead_strip	_gmbus_xfer_index_read
.subsections_via_symbols
