	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_hal_rd_rel_reg
_qat_hal_rd_rel_reg:                    ## @qat_hal_rd_rel_reg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	%ecx, %edi
	movl	%r8d, %esi
	callq	_qat_hal_get_reg_addr
	movl	%eax, %r12d
	movq	_BAD_REGADDR@GOTPCREL(%rip), %rax
	cmpw	(%rax), %r12w
	jne	LBB0_2
## %bb.1:
	movzwl	%r12w, %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movl	%r12d, %eax
	andl	$1023, %eax                     ## imm = 0x3FF
	shll	$10, %r12d
	cmpl	$128, %ebx
	cmovel	%eax, %r12d
	movq	_ACTIVE_CTX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movzbl	%r13b, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movl	%eax, %r13d
	movq	_CTX_ARB_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_CTX_ENABLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movq	_IGNORE_W1C_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movzbl	%r15b, %r15d
	movq	_ACS_ACNO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	andl	%ecx, %r13d
	cmpl	%r15d, %r13d
	je	LBB0_4
## %bb.3:
	movq	_ACTIVE_CTX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%r15d, %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_wr_ae_csr
LBB0_4:
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	leaq	-42(%rbp), %r8
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_qat_hal_get_uwords
	movq	_CTX_ENABLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_qat_hal_wr_ae_csr
	movq	_USTORE_ADDRESS@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_UA_ECS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %ecx
	callq	_qat_hal_wr_ae_csr
	movzwl	%r12w, %edi
	callq	_qat_hal_set_uword_ecc
	movzwl	%ax, %ecx
	movq	_USTORE_DATA_LOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_wr_ae_csr
	movq	_USTORE_DATA_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_wr_ae_csr
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %ecx
	callq	_qat_hal_wr_ae_csr
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_qat_hal_wait_cycles
	movq	_ALU_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_qat_hal_wr_ae_csr
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	leaq	-42(%rbp), %r8
	callq	_qat_hal_wr_uwords
	movq	_ACS_ACNO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	cmpl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	je	LBB0_6
## %bb.5:
	movq	_ACTIVE_CTX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_wr_ae_csr
LBB0_6:
	movq	_CTX_ARB_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	callq	_qat_hal_wr_ae_csr
	movq	_CTX_ENABLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_qat_hal_wr_ae_csr
	xorl	%eax, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAD_REGADDR,2,1                ## @BAD_REGADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: bad regaddr=0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ACTIVE_CTX_STATUS,4,2          ## @ACTIVE_CTX_STATUS
	.comm	_CTX_ARB_CNTL,4,2               ## @CTX_ARB_CNTL
	.comm	_CTX_ENABLES,4,2                ## @CTX_ENABLES
	.comm	_IGNORE_W1C_MASK,4,2            ## @IGNORE_W1C_MASK
	.comm	_ACS_ACNO,4,2                   ## @ACS_ACNO
	.comm	_USTORE_ADDRESS,4,2             ## @USTORE_ADDRESS
	.comm	_UA_ECS,4,2                     ## @UA_ECS
	.comm	_USTORE_DATA_LOWER,4,2          ## @USTORE_DATA_LOWER
	.comm	_USTORE_DATA_UPPER,4,2          ## @USTORE_DATA_UPPER
	.comm	_ALU_OUT,4,2                    ## @ALU_OUT
	.no_dead_strip	_qat_hal_rd_rel_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qat_hal_rd_rel_reg
_qat_hal_rd_rel_reg:                    ; @qat_hal_rd_rel_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x5
	mov	x23, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x3
	mov	x1, x4
	bl	_qat_hal_get_reg_addr
	mov	x1, x0
Lloh0:
	adrp	x8, _BAD_REGADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAD_REGADDR@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	and	w8, w1, #0x3ff
	lsl	w9, w1, #10
	cmp	w23, #128
	csel	w28, w8, w9, eq
Lloh7:
	adrp	x23, _ACTIVE_CTX_STATUS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _ACTIVE_CTX_STATUS@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
	mov	x25, x0
Lloh9:
	adrp	x8, _CTX_ARB_CNTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CTX_ARB_CNTL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
Lloh12:
	adrp	x26, _CTX_ENABLES@GOTPAGE
Lloh13:
	ldr	x26, [x26, _CTX_ENABLES@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
Lloh14:
	adrp	x8, _IGNORE_W1C_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IGNORE_W1C_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w24, w8, w0
Lloh17:
	adrp	x8, _ACS_ACNO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ACS_ACNO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w9, w8, w25
	cmp	w9, w21
	b.eq	LBB0_4
; %bb.3:
	ldr	w2, [x23]
	and	w3, w8, w21
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_wr_ae_csr
LBB0_4:
	add	x4, sp, #14
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w3, #1
	bl	_qat_hal_get_uwords
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x24
	bl	_qat_hal_wr_ae_csr
Lloh20:
	adrp	x23, _USTORE_ADDRESS@GOTPAGE
Lloh21:
	ldr	x23, [x23, _USTORE_ADDRESS@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
	mov	x26, x0
Lloh22:
	adrp	x8, _UA_ECS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UA_ECS@GOTPAGEOFF]
Lloh24:
	ldr	w27, [x8]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x27
	bl	_qat_hal_wr_ae_csr
	and	w0, w28, #0xffff
	bl	_qat_hal_set_uword_ecc
	mov	x3, x0
Lloh25:
	adrp	x8, _USTORE_DATA_LOWER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _USTORE_DATA_LOWER@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_wr_ae_csr
Lloh28:
	adrp	x8, _USTORE_DATA_UPPER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _USTORE_DATA_UPPER@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_wr_ae_csr
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x27
	bl	_qat_hal_wr_ae_csr
	mov	x0, x20
	mov	x1, x19
	mov	w2, #8
	mov	w3, #0
	bl	_qat_hal_wait_cycles
Lloh31:
	adrp	x8, _ALU_OUT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ALU_OUT@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
	str	w0, [x22]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x26
	bl	_qat_hal_wr_ae_csr
	add	x4, sp, #14
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w3, #1
	bl	_qat_hal_wr_uwords
Lloh34:
	adrp	x8, _ACS_ACNO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ACS_ACNO@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	and	w3, w8, w25
	cmp	w3, w21
	b.eq	LBB0_6
; %bb.5:
Lloh37:
	adrp	x8, _ACTIVE_CTX_STATUS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ACTIVE_CTX_STATUS@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_wr_ae_csr
LBB0_6:
Lloh40:
	adrp	x8, _CTX_ARB_CNTL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _CTX_ARB_CNTL@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	ldr	w3, [sp, #8]                    ; 4-byte Folded Reload
	bl	_qat_hal_wr_ae_csr
Lloh43:
	adrp	x8, _CTX_ENABLES@GOTPAGE
Lloh44:
	ldr	x8, [x8, _CTX_ENABLES@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x24
	bl	_qat_hal_wr_ae_csr
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_BAD_REGADDR,2,1                ; @BAD_REGADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: bad regaddr=0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ACTIVE_CTX_STATUS,4,2          ; @ACTIVE_CTX_STATUS
	.comm	_CTX_ARB_CNTL,4,2               ; @CTX_ARB_CNTL
	.comm	_CTX_ENABLES,4,2                ; @CTX_ENABLES
	.comm	_IGNORE_W1C_MASK,4,2            ; @IGNORE_W1C_MASK
	.comm	_ACS_ACNO,4,2                   ; @ACS_ACNO
	.comm	_USTORE_ADDRESS,4,2             ; @USTORE_ADDRESS
	.comm	_UA_ECS,4,2                     ; @UA_ECS
	.comm	_USTORE_DATA_LOWER,4,2          ; @USTORE_DATA_LOWER
	.comm	_USTORE_DATA_UPPER,4,2          ; @USTORE_DATA_UPPER
	.comm	_ALU_OUT,4,2                    ; @ALU_OUT
	.no_dead_strip	_qat_hal_rd_rel_reg
.subsections_via_symbols
