	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_set_ae_ctx_mode        ## -- Begin function qat_hal_set_ae_ctx_mode
	.p2align	4, 0x90
_qat_hal_set_ae_ctx_mode:               ## @qat_hal_set_ae_ctx_mode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, %r14
	cmpb	$4, %bl
	je	LBB0_3
## %bb.1:
	cmpb	$8, %bl
	jne	LBB0_2
LBB0_3:
	movq	_CTX_ENABLES@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movzbl	%sil, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_qat_hal_rd_ae_csr
	movq	_IGNORE_W1C_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CE_INUSE_CONTEXTS_BITPOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	cmpb	$4, %bl
	jne	LBB0_5
## %bb.4:
	callq	_SET_BIT
	jmp	LBB0_6
LBB0_2:
	movzbl	%bl, %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	callq	_CLR_BIT
LBB0_6:
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_qat_hal_wr_ae_csr
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: bad ctx mode=%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CTX_ENABLES,4,2                ## @CTX_ENABLES
	.comm	_IGNORE_W1C_MASK,4,2            ## @IGNORE_W1C_MASK
	.comm	_CE_INUSE_CONTEXTS_BITPOS,4,2   ## @CE_INUSE_CONTEXTS_BITPOS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_set_ae_ctx_mode        ; -- Begin function qat_hal_set_ae_ctx_mode
	.p2align	2
_qat_hal_set_ae_ctx_mode:               ; @qat_hal_set_ae_ctx_mode
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	cmp	w2, #4
	b.eq	LBB0_2
; %bb.1:
	cmp	w21, #8
	b.ne	LBB0_4
LBB0_2:
Lloh0:
	adrp	x22, _CTX_ENABLES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CTX_ENABLES@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_rd_ae_csr
Lloh2:
	adrp	x8, _IGNORE_W1C_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IGNORE_W1C_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w0, w8, w0
Lloh5:
	adrp	x8, _CE_INUSE_CONTEXTS_BITPOS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CE_INUSE_CONTEXTS_BITPOS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	cmp	w21, #4
	b.ne	LBB0_5
; %bb.3:
	bl	_SET_BIT
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	bl	_CLR_BIT
LBB0_6:
	mov	x3, x0
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x19
	bl	_qat_hal_wr_ae_csr
	mov	w0, #0
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: bad ctx mode=%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CTX_ENABLES,4,2                ; @CTX_ENABLES
	.comm	_IGNORE_W1C_MASK,4,2            ; @IGNORE_W1C_MASK
	.comm	_CE_INUSE_CONTEXTS_BITPOS,4,2   ; @CE_INUSE_CONTEXTS_BITPOS
.subsections_via_symbols
