	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_huc_auth                 ## -- Begin function intel_huc_auth
	.p2align	4, 0x90
_intel_huc_auth:                        ## @intel_huc_auth
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_huc_to_gt
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_intel_huc_is_authenticated
	movl	%eax, %edi
	callq	_GEM_BUG_ON
	movq	%r15, %rdi
	callq	_intel_uc_fw_is_loaded
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	callq	_i915_inject_load_error
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rbx
	addq	$8, %rbx
	movl	16(%r15), %esi
	movq	%rbx, %rdi
	callq	_intel_guc_ggtt_offset
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_intel_guc_auth_huc
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	movq	_ENOEXEC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_7:
	movl	4(%r14), %edi
	movl	12(%r15), %esi
	movl	4(%r15), %ecx
	movl	8(%r15), %edx
	movq	$0, (%rsp)
	movl	$2, %r8d
	movl	$50, %r9d
	callq	___intel_wait_for_register
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_i915_probe_error
	movq	_INTEL_UC_FIRMWARE_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_intel_uc_fw_change_status
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_INTEL_UC_FIRMWARE_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_intel_uc_fw_change_status
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOEXEC,4,2                    ## @ENOEXEC
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HuC: GuC did not ack Auth request %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"HuC: Firmware not verified %d\n"

	.comm	_INTEL_UC_FIRMWARE_RUNNING,4,2  ## @INTEL_UC_FIRMWARE_RUNNING
L_.str.2:                               ## @.str.2
	.asciz	"HuC: Authentication failed %d\n"

	.comm	_INTEL_UC_FIRMWARE_FAIL,4,2     ## @INTEL_UC_FIRMWARE_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_huc_auth                 ; -- Begin function intel_huc_auth
	.p2align	2
_intel_huc_auth:                        ; @intel_huc_auth
	.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	x19, x0
	bl	_huc_to_gt
	mov	x20, x0
	mov	x0, x19
	bl	_intel_huc_is_authenticated
	bl	_GEM_BUG_ON
	mov	x0, x19
	bl	_intel_uc_fw_is_loaded
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w1, w8
	bl	_i915_inject_load_error
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.2:
	add	x21, x20, #8
	ldr	w1, [x19, #16]
	mov	x0, x21
	bl	_intel_guc_ggtt_offset
	mov	x1, x0
	mov	x0, x21
	bl	_intel_guc_auth_huc
	cbz	w0, LBB0_5
; %bb.3:
	mov	x21, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _ENOEXEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOEXEC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_5:
	ldr	w0, [x20, #4]
	ldp	w2, w1, [x19, #8]
	ldr	w3, [x19, #4]
	mov	w4, #2
	mov	w5, #50
	mov	x6, #0
	bl	___intel_wait_for_register
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	mov	x1, x21
	bl	_DRM_ERROR
LBB0_8:
	ldr	w0, [x20]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_i915_probe_error
Lloh12:
	adrp	x8, _INTEL_UC_FIRMWARE_FAIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INTEL_UC_FIRMWARE_FAIL@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_intel_uc_fw_change_status
LBB0_10:
	mov	x0, x21
	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_11:
Lloh14:
	adrp	x8, _INTEL_UC_FIRMWARE_RUNNING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INTEL_UC_FIRMWARE_RUNNING@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOEXEC,4,2                    ; @ENOEXEC
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HuC: GuC did not ack Auth request %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"HuC: Firmware not verified %d\n"

	.comm	_INTEL_UC_FIRMWARE_RUNNING,4,2  ; @INTEL_UC_FIRMWARE_RUNNING
l_.str.2:                               ; @.str.2
	.asciz	"HuC: Authentication failed %d\n"

	.comm	_INTEL_UC_FIRMWARE_FAIL,4,2     ; @INTEL_UC_FIRMWARE_FAIL
.subsections_via_symbols
