	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpu_i2c_check_status
_gpu_i2c_check_status:                  ## @gpu_i2c_check_status
	.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
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	addq	%rbx, %r15
	movq	_I2C_MST_CNTL_CYCLE_TRIGGER@GOTPCREL(%rip), %r12
	movq	_I2C_MST_CNTL_STATUS_BUS_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_I2C_MST_CNTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_I2C_MST_CNTL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	cmpl	(%r13), %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	jne	LBB0_1
LBB0_4:
	movq	%r15, %rdi
	callq	_time_is_before_jiffies
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_I2C_MST_CNTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %ecx
	movq	_I2C_MST_CNTL_STATUS@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	cmpl	$128, %ecx
	je	LBB0_6
## %bb.8:
	xorl	%eax, %eax
	cmpl	$130, %ecx
	jne	LBB0_11
## %bb.9:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_I2C_MST_CNTL,8,3               ## @I2C_MST_CNTL
	.comm	_I2C_MST_CNTL_CYCLE_TRIGGER,4,2 ## @I2C_MST_CNTL_CYCLE_TRIGGER
	.comm	_I2C_MST_CNTL_STATUS,4,2        ## @I2C_MST_CNTL_STATUS
	.comm	_I2C_MST_CNTL_STATUS_BUS_BUSY,4,2 ## @I2C_MST_CNTL_STATUS_BUS_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c timeout error %x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_gpu_i2c_check_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpu_i2c_check_status
_gpu_i2c_check_status:                  ; @gpu_i2c_check_status
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh3:
	adrp	x23, _I2C_MST_CNTL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _I2C_MST_CNTL@GOTPAGEOFF]
Lloh5:
	adrp	x24, _I2C_MST_CNTL_CYCLE_TRIGGER@GOTPAGE
Lloh6:
	ldr	x24, [x24, _I2C_MST_CNTL_CYCLE_TRIGGER@GOTPAGEOFF]
Lloh7:
	adrp	x22, _I2C_MST_CNTL_STATUS@GOTPAGE
Lloh8:
	ldr	x22, [x22, _I2C_MST_CNTL_STATUS@GOTPAGEOFF]
Lloh9:
	adrp	x25, _I2C_MST_CNTL_STATUS_BUS_BUSY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _I2C_MST_CNTL_STATUS_BUS_BUSY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x22]
	and	w8, w8, w21
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	mov	x0, x20
	bl	_time_is_after_jiffies
	cbnz	x0, LBB0_1
LBB0_4:
	mov	x0, x20
	bl	_time_is_before_jiffies
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_6:
Lloh13:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	and	w8, w8, w0
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.10:
	cmp	w8, #130
	b.ne	LBB0_12
; %bb.11:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_12:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_I2C_MST_CNTL,8,3               ; @I2C_MST_CNTL
	.comm	_I2C_MST_CNTL_CYCLE_TRIGGER,4,2 ; @I2C_MST_CNTL_CYCLE_TRIGGER
	.comm	_I2C_MST_CNTL_STATUS,4,2        ; @I2C_MST_CNTL_STATUS
	.comm	_I2C_MST_CNTL_STATUS_BUS_BUSY,4,2 ; @I2C_MST_CNTL_STATUS_BUS_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c timeout error %x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_gpu_i2c_check_status
.subsections_via_symbols
