	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmbus_wait_hw_status
_gmbus_wait_hw_status:                  ## @gmbus_wait_hw_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
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movslq	(%rdi), %r15
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movl	8(%r12), %edi
	callq	_HAS_GMBUS_IRQ
	testl	%eax, %eax
	cmovel	%eax, %ebx
	movq	_GMBUS4@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	movl	%ebx, %esi
	callq	_I915_WRITE
	addq	$4, %r12
	movl	$50, %edi
	callq	_msecs_to_jiffies
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$-1, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	movq	_GMBUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_I915_READ_NOTRACE
	movl	%eax, %ebx
	movq	_GMBUS_SATOER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r14d, %eax
	testl	%ebx, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_schedule_timeout
	movl	$50, %edi
	callq	_msecs_to_jiffies
	incl	%r13d
	cmpl	%eax, %r13d
	jl	LBB0_3
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_finish_wait
	movq	_GMBUS4@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movq	_GMBUS_SATOER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_7:
	testl	%r14d, %ebx
	je	LBB0_8
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_GMBUS4,8,3                     ## @GMBUS4
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_GMBUS2,8,3                     ## @GMBUS2
	.comm	_GMBUS_SATOER,4,2               ## @GMBUS_SATOER
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_gmbus_wait_hw_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmbus_wait_hw_status
_gmbus_wait_hw_status:                  ; @gmbus_wait_hw_status
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldrsw	x23, [x0]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	ldr	w0, [x21, #8]
	bl	_HAS_GMBUS_IRQ
	cmp	w0, #0
	csel	w1, wzr, w20, eq
Lloh3:
	adrp	x24, _GMBUS4@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GMBUS4@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x0, x8, x23
	bl	_I915_WRITE
	add	x20, x21, #4
	mov	w0, #50
	bl	_msecs_to_jiffies
Lloh5:
	adrp	x25, _GMBUS_SATOER@GOTPAGE
Lloh6:
	ldr	x25, [x25, _GMBUS_SATOER@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	w26, #-1
Lloh7:
	adrp	x27, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh8:
	ldr	x27, [x27, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh9:
	adrp	x22, _wait@GOTPAGE
Lloh10:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
Lloh11:
	adrp	x28, _GMBUS2@GOTPAGE
Lloh12:
	ldr	x28, [x28, _GMBUS2@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x27]
	mov	x0, x20
	mov	x1, x22
	bl	_prepare_to_wait
	ldr	x8, [x28]
	add	x0, x8, x23
	bl	_I915_READ_NOTRACE
	mov	x21, x0
	ldr	w8, [x25]
	orr	w8, w8, w19
	tst	w8, w0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_schedule_timeout
	mov	w0, #50
	bl	_msecs_to_jiffies
	add	w26, w26, #1
	cmp	w26, w0
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
Lloh13:
	adrp	x1, _wait@GOTPAGE
Lloh14:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x20
	bl	_finish_wait
	ldr	x8, [x24]
	add	x0, x8, x23
	mov	w1, #0
	bl	_I915_WRITE
	ldr	w8, [x25]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.6:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	tst	w21, w19
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_GMBUS4,8,3                     ; @GMBUS4
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_GMBUS2,8,3                     ; @GMBUS2
	.comm	_GMBUS_SATOER,4,2               ; @GMBUS_SATOER
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_gmbus_wait_hw_status
.subsections_via_symbols
