	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_hal_wr_rel_reg
_qat_hal_wr_rel_reg:                    ## @qat_hal_wr_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movaps	L___const.qat_hal_wr_rel_reg.insts(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_qat_hal_get_reg_addr
	movzwl	%ax, %r14d
	movq	_BAD_REGADDR@GOTPCREL(%rip), %rax
	cmpw	(%rax), %r14w
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	shrl	$16, %eax
	movq	_ICP_NO_DEST@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movzbl	%al, %esi
	callq	_qat_hal_get_reg_addr
	movl	%eax, %r12d
	movl	(%r13), %edi
	movzwl	%bx, %r13d
	movzbl	%bl, %esi
	callq	_qat_hal_get_reg_addr
                                        ## kill: def $ax killed $ax def $eax
	shrl	$4, %ebx
	andl	$267386880, %ebx                ## imm = 0xFF00000
	movl	-64(%rbp), %ecx
	cmpl	$128, %r15d
	jne	LBB0_4
## %bb.3:
	andl	$1023, %r12d                    ## imm = 0x3FF
	shll	$10, %r12d
	shll	$12, %r13d
	orl	%r14d, %r13d
	andl	$1023, %r14d                    ## imm = 0x3FF
	orl	%ebx, %r14d
	orl	%r12d, %r14d
	orl	%ecx, %r14d
	movl	%r14d, -64(%rbp)
	andl	$1023, %eax                     ## imm = 0x3FF
	shll	$10, %eax
	andl	$267387903, %r13d               ## imm = 0xFF003FF
	jmp	LBB0_5
LBB0_4:
	shll	$10, %r14d
	andl	$1047552, %r14d                 ## imm = 0xFFC00
	andl	$1023, %r12d                    ## imm = 0x3FF
	orl	%r14d, %ebx
	orl	%r12d, %ebx
	orl	%ecx, %ebx
	movl	%ebx, -64(%rbp)
	shll	$12, %r13d
	andl	$267386880, %r13d               ## imm = 0xFF00000
	andl	$1023, %eax                     ## imm = 0x3FF
	orl	%r14d, %r13d
LBB0_5:
	orl	%eax, %r13d
	orl	%r13d, -60(%rbp)
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	leal	(%r8,%r8,4), %eax
	movzbl	-72(%rbp), %esi                 ## 1-byte Folded Reload
	movzbl	-68(%rbp), %edx                 ## 1-byte Folded Reload
	leaq	-64(%rbp), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	$1, %r9d
	pushq	$0
	pushq	%rax
	callq	_qat_hal_exec_micro_inst
	addq	$16, %rsp
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.qat_hal_wr_rel_reg.insts
L___const.qat_hal_wr_rel_reg.insts:
	.long	1073741824                      ## 0x40000000
	.long	1073741824                      ## 0x40000000
	.long	787200                          ## 0xc0300
	.long	65536                           ## 0x10000

	.comm	_BAD_REGADDR,2,1                ## @BAD_REGADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: bad destAddr=0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ICP_NO_DEST,4,2                ## @ICP_NO_DEST
	.no_dead_strip	_qat_hal_wr_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_wr_rel_reg
_qat_hal_wr_rel_reg:                    ; @qat_hal_wr_rel_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x25, x5
	mov	x23, x4
	mov	x24, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, l___const.qat_hal_wr_rel_reg.insts@PAGE
Lloh4:
	add	x8, x8, l___const.qat_hal_wr_rel_reg.insts@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp]
	mov	x0, sp
	bl	_ARRAY_SIZE
	mov	x22, x0
	mov	x0, x24
	mov	x1, x23
	bl	_qat_hal_get_reg_addr
	mov	x23, x0
Lloh6:
	adrp	x8, _BAD_REGADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BAD_REGADDR@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_pr_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
Lloh13:
	adrp	x27, _ICP_NO_DEST@GOTPAGE
Lloh14:
	ldr	x27, [x27, _ICP_NO_DEST@GOTPAGEOFF]
	ldr	w0, [x27]
	ubfx	w1, w25, #16, #8
	bl	_qat_hal_get_reg_addr
	mov	x26, x0
	ldr	w0, [x27]
	and	w27, w25, #0xffff
	and	w1, w25, #0xff
	bl	_qat_hal_get_reg_addr
	ldr	w8, [sp]
	lsr	w9, w25, #4
	and	w9, w9, #0xff00000
	cmp	w24, #128
	b.ne	LBB0_4
; %bb.3:
	and	w10, w26, #0x3ff
	orr	w11, w23, w27, lsl #12
	and	w12, w23, #0x3ff
	orr	w9, w12, w9
	orr	w9, w9, w10, lsl #10
	orr	w8, w9, w8
	ldr	w9, [sp, #4]
	and	w10, w0, #0x3ff
	and	w11, w11, #0xfff003ff
	orr	w10, w11, w10, lsl #10
	b	LBB0_5
LBB0_4:
	ubfiz	w10, w23, #10, #10
	and	w11, w26, #0x3ff
	orr	w9, w10, w9
	orr	w9, w9, w11
	orr	w8, w9, w8
	ldr	w9, [sp, #4]
	lsl	w10, w27, #12
	and	w10, w10, #0xff00000
	bfi	w10, w23, #10, #10
	bfxil	w10, w0, #0, #10
LBB0_5:
	orr	w9, w10, w9
	stp	w8, w9, [sp]
	add	w6, w22, w22, lsl #2
	mov	x3, sp
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x4, x22
	mov	w5, #1
	mov	x7, #0
	bl	_qat_hal_exec_micro_inst
LBB0_6:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.qat_hal_wr_rel_reg.insts
l___const.qat_hal_wr_rel_reg.insts:
	.long	1073741824                      ; 0x40000000
	.long	1073741824                      ; 0x40000000
	.long	787200                          ; 0xc0300
	.long	65536                           ; 0x10000

	.comm	_BAD_REGADDR,2,1                ; @BAD_REGADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: bad destAddr=0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ICP_NO_DEST,4,2                ; @ICP_NO_DEST
	.no_dead_strip	_qat_hal_wr_rel_reg
.subsections_via_symbols
