	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpu_i2c_read
_gpu_i2c_read:                          ## @gpu_i2c_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	_I2C_MST_CNTL_BURST_SIZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%edx, %eax
	shll	%cl, %eax
	movq	_I2C_MST_CNTL_GEN_START@GOTPCREL(%rip), %rcx
	movq	_I2C_MST_CNTL_CMD_READ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	orl	%edx, %eax
	movq	_I2C_MST_CNTL_CYCLE_TRIGGER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_I2C_MST_CNTL_GEN_NACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_I2C_MST_CNTL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rdi), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	%rbx, %rdi
	callq	_gpu_i2c_check_status
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_I2C_MST_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	decl	%r13d
	cmpl	$3, %r13d
	ja	LBB0_7
## %bb.2:
	movl	%eax, %r12d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r13,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	movl	%r12d, (%r14)
	jmp	LBB0_7
LBB0_4:
	movl	%r12d, %edi
	movq	%r14, %rsi
	callq	_put_unaligned_be16
	jmp	LBB0_7
LBB0_5:
	movl	%r12d, %edi
	sarl	$8, %edi
	movq	%r14, %rsi
	callq	_put_unaligned_be16
	movl	%r12d, 8(%r14)
	jmp	LBB0_7
LBB0_6:
	movl	%r12d, %edi
	movq	%r14, %rsi
	callq	_put_unaligned_be32
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_I2C_MST_CNTL_GEN_START,4,2     ## @I2C_MST_CNTL_GEN_START
	.comm	_I2C_MST_CNTL_CMD_READ,4,2      ## @I2C_MST_CNTL_CMD_READ
	.comm	_I2C_MST_CNTL_BURST_SIZE_SHIFT,4,2 ## @I2C_MST_CNTL_BURST_SIZE_SHIFT
	.comm	_I2C_MST_CNTL_CYCLE_TRIGGER,4,2 ## @I2C_MST_CNTL_CYCLE_TRIGGER
	.comm	_I2C_MST_CNTL_GEN_NACK,4,2      ## @I2C_MST_CNTL_GEN_NACK
	.comm	_I2C_MST_CNTL,8,3               ## @I2C_MST_CNTL
	.comm	_I2C_MST_DATA,8,3               ## @I2C_MST_DATA
	.no_dead_strip	_gpu_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpu_i2c_read
_gpu_i2c_read:                          ; @gpu_i2c_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	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _I2C_MST_CNTL_GEN_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_MST_CNTL_GEN_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I2C_MST_CNTL_CMD_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_MST_CNTL_CMD_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _I2C_MST_CNTL_BURST_SIZE_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I2C_MST_CNTL_BURST_SIZE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w9, w2, w9
Lloh9:
	adrp	x10, _I2C_MST_CNTL_CYCLE_TRIGGER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _I2C_MST_CNTL_CYCLE_TRIGGER@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh11:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _I2C_MST_CNTL_GEN_NACK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I2C_MST_CNTL_GEN_NACK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x22]
Lloh15:
	adrp	x9, _I2C_MST_CNTL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _I2C_MST_CNTL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x22
	bl	_gpu_i2c_check_status
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [x22]
Lloh18:
	adrp	x9, _I2C_MST_DATA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _I2C_MST_DATA@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	sub	w8, w21, #1
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.2:
	mov	x22, x0
Lloh21:
	adrp	x9, lJTI0_0@PAGE
Lloh22:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	str	w22, [x19]
	b	LBB0_7
LBB0_4:
	mov	x0, x22
	mov	x1, x19
	bl	_put_unaligned_be16
	b	LBB0_7
LBB0_5:
	asr	w0, w22, #8
	mov	x1, x19
	bl	_put_unaligned_be16
	str	w22, [x19, #8]
	b	LBB0_7
LBB0_6:
	mov	x0, x22
	mov	x1, x19
	bl	_put_unaligned_be32
LBB0_7:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
                                        ; -- End function
	.comm	_I2C_MST_CNTL_GEN_START,4,2     ; @I2C_MST_CNTL_GEN_START
	.comm	_I2C_MST_CNTL_CMD_READ,4,2      ; @I2C_MST_CNTL_CMD_READ
	.comm	_I2C_MST_CNTL_BURST_SIZE_SHIFT,4,2 ; @I2C_MST_CNTL_BURST_SIZE_SHIFT
	.comm	_I2C_MST_CNTL_CYCLE_TRIGGER,4,2 ; @I2C_MST_CNTL_CYCLE_TRIGGER
	.comm	_I2C_MST_CNTL_GEN_NACK,4,2      ; @I2C_MST_CNTL_GEN_NACK
	.comm	_I2C_MST_CNTL,8,3               ; @I2C_MST_CNTL
	.comm	_I2C_MST_DATA,8,3               ; @I2C_MST_DATA
	.no_dead_strip	_gpu_i2c_read
.subsections_via_symbols
