	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_uc_init_hw               ## -- Begin function intel_uc_init_hw
	.p2align	4, 0x90
_intel_uc_init_hw:                      ## @intel_uc_init_hw
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_uc_to_gt
	movq	(%rax), %r14
	movq	%r12, %rdi
	callq	_intel_uc_supports_guc
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_27
## %bb.1:
	movq	%r12, %rdi
	callq	_intel_uc_uses_guc
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_uc_is_wopcm_locked
	testq	%rax, %rax
	je	LBB0_27
LBB0_3:
	leaq	12(%r12), %r13
	movq	%r13, %rdi
	callq	_intel_uc_fw_is_available
	movq	%r12, %rdi
	testl	%eax, %eax
	je	LBB0_4
## %bb.8:
	callq	_uc_init_wopcm
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.9:
	movq	%r13, %rdi
	callq	_guc_reset_interrupts
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$9, %esi
	callq	_IS_GEN
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
	addl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	___uc_sanitize
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	callq	_intel_huc_fw_upload
	movq	%r13, %rdi
	callq	_intel_guc_ads_reset
	movq	%r13, %rdi
	callq	_intel_guc_write_params
	movq	%r13, %rdi
	callq	_intel_guc_fw_upload
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_DRM_DEBUG_DRIVER
	addl	$-1, %r14d
	jb	LBB0_10
	jmp	LBB0_21
LBB0_4:
	callq	_uc_is_wopcm_locked
	testq	%rax, %rax
	jne	LBB0_25
## %bb.5:
	movq	%r13, %rdi
	callq	_intel_uc_fw_is_overridden
	testq	%rax, %rax
	jne	LBB0_25
## %bb.6:
	movq	%r12, %rdi
	callq	_intel_uc_supports_guc_submission
	testq	%rax, %rax
	je	LBB0_7
LBB0_25:
	movl	24(%r12), %edi
	callq	_intel_uc_fw_status_to_error
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	___uc_sanitize
	testl	%ebx, %ebx
	jne	LBB0_24
LBB0_26:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_notice
	jmp	LBB0_27
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_22
LBB0_14:
	movq	%r13, %rdi
	callq	_guc_enable_communication
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:
	movq	%r12, %rdi
	callq	_intel_huc_auth
	movq	%r13, %rdi
	callq	_intel_guc_sample_forcewake
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_16
LBB0_20:
	movq	%r13, %rdi
	callq	_guc_disable_communication
LBB0_21:
	movq	%r12, %rdi
	callq	___uc_capture_load_err_log
LBB0_22:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_23:
	movq	%r12, %rdi
	callq	___uc_sanitize
LBB0_24:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_i915_probe_error
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_27:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r12, %rdi
	callq	___uc_sanitize
	jmp	LBB0_26
LBB0_16:
	movq	%r12, %rdi
	callq	_intel_uc_supports_guc_submission
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	callq	_intel_guc_submission_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_INTEL_UC_FW_TYPE_GUC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_intel_uc_fw_type_repr
	movl	%eax, %ebx
	movl	20(%r12), %r13d
	movl	12(%r12), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	16(%r12), %r14d
	movq	%r12, %rdi
	callq	_intel_uc_supports_guc_submission
	movq	%rax, %rdi
	callq	_enableddisabled
                                        ## kill: def $eax killed $eax def $rax
	leaq	L_.str.2(%rip), %r10
	leaq	L_.str.1(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	%r10
	callq	_dev_info
	addq	$16, %rsp
	movq	%r12, %rdi
	callq	_intel_uc_uses_huc
	testq	%rax, %rax
	je	LBB0_27
## %bb.19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_INTEL_UC_FW_TYPE_HUC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_intel_uc_fw_type_repr
	movl	%eax, %ebx
	movl	8(%r12), %r13d
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r12), %r14d
	movq	%r12, %rdi
	callq	_intel_huc_is_authenticated
	movl	%eax, %edi
	callq	_yesno
                                        ## kill: def $eax killed $eax def $rax
	leaq	L_.str.3(%rip), %r10
	leaq	L_.str.1(%rip), %rsi
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	%r10
	callq	_dev_info
	addq	$16, %rsp
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GuC fw load failed: %d; will reset and retry %d more time(s)\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s firmware %s version %u.%u %s:%s\n"

	.comm	_INTEL_UC_FW_TYPE_GUC,4,2       ## @INTEL_UC_FW_TYPE_GUC
L_.str.2:                               ## @.str.2
	.asciz	"submission"

	.comm	_INTEL_UC_FW_TYPE_HUC,4,2       ## @INTEL_UC_FW_TYPE_HUC
L_.str.3:                               ## @.str.3
	.asciz	"authenticated"

L_.str.4:                               ## @.str.4
	.asciz	"GuC is uninitialized\n"

L_.str.5:                               ## @.str.5
	.asciz	"GuC initialization failed %d\n"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_uc_init_hw               ; -- Begin function intel_uc_init_hw
	.p2align	2
_intel_uc_init_hw:                      ; @intel_uc_init_hw
	.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	x20, x0
	bl	_uc_to_gt
	ldr	x19, [x0]
	mov	x0, x20
	bl	_intel_uc_supports_guc
	cbz	w0, LBB0_25
; %bb.1:
	mov	x0, x20
	bl	_intel_uc_uses_guc
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_uc_is_wopcm_locked
	cbz	x0, LBB0_25
LBB0_3:
	add	x21, x20, #12
	mov	x0, x21
	bl	_intel_uc_fw_is_available
	cbz	w0, LBB0_13
; %bb.4:
	mov	x0, x20
	bl	_uc_init_wopcm
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.5:
	mov	x0, x21
	bl	_guc_reset_interrupts
	mov	x0, x19
	mov	w1, #9
	bl	_IS_GEN
	mov	x24, x0
	cmp	x0, #0
	cset	w23, ne
	mov	x0, x20
	bl	___uc_sanitize
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.6:
	mov	x0, x20
	bl	_intel_huc_fw_upload
	mov	x0, x21
	bl	_intel_guc_ads_reset
	mov	x0, x21
	bl	_intel_guc_write_params
	mov	x0, x21
	bl	_intel_guc_fw_upload
	cbz	w0, LBB0_19
; %bb.7:
	mov	x22, x0
	lsl	w23, w23, #1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_DRM_DEBUG_DRIVER
	cbz	x24, LBB0_22
; %bb.8:
	mov	x0, x20
	bl	___uc_sanitize
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.9:
	mov	x0, x20
	bl	_intel_huc_fw_upload
	mov	x0, x21
	bl	_intel_guc_ads_reset
	mov	x0, x21
	bl	_intel_guc_write_params
	mov	x0, x21
	bl	_intel_guc_fw_upload
	cbz	w0, LBB0_19
; %bb.10:
	mov	x1, x0
	sub	w2, w23, #1
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x20
	bl	___uc_sanitize
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.11:
	mov	x0, x20
	bl	_intel_huc_fw_upload
	mov	x0, x21
	bl	_intel_guc_ads_reset
	mov	x0, x21
	bl	_intel_guc_write_params
	mov	x0, x21
	bl	_intel_guc_fw_upload
	cbz	w0, LBB0_19
; %bb.12:
	mov	x22, x0
	sub	w2, w23, #2
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG_DRIVER
	b	LBB0_22
LBB0_13:
	mov	x0, x20
	bl	_uc_is_wopcm_locked
	cbnz	x0, LBB0_16
; %bb.14:
	mov	x0, x21
	bl	_intel_uc_fw_is_overridden
	cbnz	x0, LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_intel_uc_supports_guc_submission
	cbz	x0, LBB0_26
LBB0_16:
	ldr	w0, [x20, #24]
	bl	_intel_uc_fw_status_to_error
	mov	x22, x0
	mov	x0, x20
	bl	___uc_sanitize
	cbnz	w22, LBB0_24
LBB0_17:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_notice
LBB0_18:
	mov	w0, #0
	b	LBB0_25
LBB0_19:
	mov	x0, x21
	bl	_guc_enable_communication
	mov	x22, x0
	cbnz	w0, LBB0_22
; %bb.20:
	mov	x0, x20
	bl	_intel_huc_auth
	mov	x0, x21
	bl	_intel_guc_sample_forcewake
	mov	x22, x0
	cbz	w0, LBB0_27
LBB0_21:
	mov	x0, x21
	bl	_guc_disable_communication
LBB0_22:
	mov	x0, x20
	bl	___uc_capture_load_err_log
LBB0_23:
	mov	x0, x20
	bl	___uc_sanitize
LBB0_24:
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_i915_probe_error
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_25:
	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_26:
	mov	x0, x20
	bl	___uc_sanitize
	b	LBB0_17
LBB0_27:
	mov	x0, x20
	bl	_intel_uc_supports_guc_submission
	cbz	x0, LBB0_29
; %bb.28:
	mov	x0, x21
	bl	_intel_guc_submission_enable
	mov	x22, x0
	cbnz	w0, LBB0_21
LBB0_29:
	ldr	w21, [x19]
Lloh13:
	adrp	x8, _INTEL_UC_FW_TYPE_GUC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INTEL_UC_FW_TYPE_GUC@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_intel_uc_fw_type_repr
	mov	x22, x0
	ldp	w24, w23, [x20, #16]
	ldr	w25, [x20, #12]
	mov	x0, x20
	bl	_intel_uc_supports_guc_submission
	bl	_enableddisabled
	mov	x7, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh18:
	adrp	x6, l_.str.2@PAGE
Lloh19:
	add	x6, x6, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	mov	x5, x25
	bl	_dev_info
	mov	x0, x20
	bl	_intel_uc_uses_huc
	cbz	x0, LBB0_25
; %bb.30:
	ldr	w19, [x19]
Lloh20:
	adrp	x8, _INTEL_UC_FW_TYPE_HUC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _INTEL_UC_FW_TYPE_HUC@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_intel_uc_fw_type_repr
	mov	x21, x0
	ldp	w23, w22, [x20, #4]
	ldr	w24, [x20]
	mov	x0, x20
	bl	_intel_huc_is_authenticated
	bl	_yesno
	mov	x7, x0
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh25:
	adrp	x6, l_.str.3@PAGE
Lloh26:
	add	x6, x6, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_dev_info
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GuC fw load failed: %d; will reset and retry %d more time(s)\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s firmware %s version %u.%u %s:%s\n"

	.comm	_INTEL_UC_FW_TYPE_GUC,4,2       ; @INTEL_UC_FW_TYPE_GUC
l_.str.2:                               ; @.str.2
	.asciz	"submission"

	.comm	_INTEL_UC_FW_TYPE_HUC,4,2       ; @INTEL_UC_FW_TYPE_HUC
l_.str.3:                               ; @.str.3
	.asciz	"authenticated"

l_.str.4:                               ; @.str.4
	.asciz	"GuC is uninitialized\n"

l_.str.5:                               ; @.str.5
	.asciz	"GuC initialization failed %d\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
