	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_sham_write_ctrl_omap4
_omap_sham_write_ctrl_omap4:            ## @omap_sham_write_ctrl_omap4
	.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
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_ahash_request_ctx
	movq	%rax, %r12
	movq	_FLAGS_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r12), %r13d
	movq	_FLAGS_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	cmpq	$0, 8(%r12)
	je	LBB0_1
## %bb.4:
	testl	%ebx, %ebx
	jne	LBB0_5
	jmp	LBB0_7
LBB0_1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %edi
	callq	_crypto_ahash_reqtfm
	movq	%rax, %rdi
	callq	_crypto_ahash_ctx
	movq	_SHA_REG_MODE_ALGO_CONSTANT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r13d
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r12), %ebx
	movq	_FLAGS_HMAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_get_block_size
	cltq
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	sarl	$3, %ebx
	movq	_SHA_REG_MODE_HMAC_KEY_PROC@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_SHA_REG_ODIGEST
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %ecx
	callq	_omap_sham_write_n
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_SHA_REG_IDIGEST
	movslq	%ebx, %rcx
	leaq	(,%rcx,4), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	(%rsi), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_omap_sham_write_n
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, 8(%r12)
LBB0_3:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_5:
	movq	_SHA_REG_MODE_CLOSE_HASH@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movl	(%r12), %ebx
	movq	_FLAGS_HMAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_7
## %bb.6:
	movq	_SHA_REG_MODE_HMAC_OUTER_HASH@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_7:
	movq	_SHA_REG_MODE_ALGO_CONSTANT@GOTPCREL(%rip), %rax
	movq	_SHA_REG_MODE_CLOSE_HASH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_SHA_REG_MODE_ALGO_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SHA_REG_MODE_HMAC_OUTER_HASH@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SHA_REG_MODE_HMAC_KEY_PROC@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %edi
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_SHA_REG_MODE
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_omap_sham_write_mask
	movq	_SHA_REG_IRQENA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SHA_REG_IRQENA_OUTPUT_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_omap_sham_write
	movq	%r15, %rdi
	callq	_SHA_REG_MASK
	movq	_SHA_REG_MASK_IT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%r14d, %r14d
	movq	_SHA_REG_MASK_DMA_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovnel	%ecx, %r14d
	orl	%edx, %r14d
	orl	%edx, %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_sham_write_mask           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAGS_MODE_MASK,4,2            ## @FLAGS_MODE_MASK
	.comm	_FLAGS_MODE_SHIFT,4,2           ## @FLAGS_MODE_SHIFT
	.comm	_SHA_REG_MODE_ALGO_CONSTANT,4,2 ## @SHA_REG_MODE_ALGO_CONSTANT
	.comm	_FLAGS_HMAC,4,2                 ## @FLAGS_HMAC
	.comm	_SHA_REG_MODE_HMAC_KEY_PROC,4,2 ## @SHA_REG_MODE_HMAC_KEY_PROC
	.comm	_SHA_REG_MODE_CLOSE_HASH,4,2    ## @SHA_REG_MODE_CLOSE_HASH
	.comm	_SHA_REG_MODE_HMAC_OUTER_HASH,4,2 ## @SHA_REG_MODE_HMAC_OUTER_HASH
	.comm	_SHA_REG_MODE_ALGO_MASK,4,2     ## @SHA_REG_MODE_ALGO_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ctrl: %08x, flags: %08lx\n"

	.comm	_SHA_REG_IRQENA,4,2             ## @SHA_REG_IRQENA
	.comm	_SHA_REG_IRQENA_OUTPUT_RDY,4,2  ## @SHA_REG_IRQENA_OUTPUT_RDY
	.comm	_SHA_REG_MASK_IT_EN,4,2         ## @SHA_REG_MASK_IT_EN
	.comm	_SHA_REG_MASK_DMA_EN,4,2        ## @SHA_REG_MASK_DMA_EN
	.no_dead_strip	_omap_sham_write_ctrl_omap4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_sham_write_ctrl_omap4
_omap_sham_write_ctrl_omap4:            ; @omap_sham_write_ctrl_omap4
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x3
	mov	x23, x2
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_ahash_request_ctx
	mov	x22, x0
Lloh0:
	adrp	x8, _FLAGS_MODE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAGS_MODE_MASK@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w9
Lloh3:
	adrp	x9, _FLAGS_MODE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FLAGS_MODE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w21, w8, w9
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x27, _SHA_REG_MODE_ALGO_CONSTANT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _SHA_REG_MODE_ALGO_CONSTANT@GOTPAGEOFF]
Lloh8:
	adrp	x26, _SHA_REG_MODE_HMAC_KEY_PROC@GOTPAGE
Lloh9:
	ldr	x26, [x26, _SHA_REG_MODE_HMAC_KEY_PROC@GOTPAGEOFF]
	cbnz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_crypto_ahash_reqtfm
	bl	_crypto_ahash_ctx
	ldr	x28, [x0]
	ldr	w8, [x27]
	orr	w21, w8, w21
	ldr	w24, [x22]
Lloh10:
	adrp	x8, _FLAGS_HMAC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FLAGS_HMAC@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_BIT
	tst	w0, w24
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_get_block_size
	mov	x24, x0
	asr	w25, w0, #3
	ldr	w8, [x26]
	orr	w21, w8, w21
	mov	x0, x19
	mov	w1, #0
	bl	_SHA_REG_ODIGEST
	mov	x1, x0
	ldr	x2, [x28]
	mov	x0, x19
	mov	x3, x25
	bl	_omap_sham_write_n
	mov	x0, x19
	mov	w1, #0
	bl	_SHA_REG_IDIGEST
	mov	x1, x0
	ldr	x8, [x28]
	add	x2, x8, w25, sxtw #2
	mov	x0, x19
	mov	x3, x25
	bl	_omap_sham_write_n
	ldr	x8, [x22, #8]
	add	x8, x8, w24, sxtw
	str	x8, [x22, #8]
LBB0_3:
Lloh13:
	adrp	x25, _SHA_REG_MODE_CLOSE_HASH@GOTPAGE
Lloh14:
	ldr	x25, [x25, _SHA_REG_MODE_CLOSE_HASH@GOTPAGEOFF]
Lloh15:
	adrp	x24, _SHA_REG_MODE_HMAC_OUTER_HASH@GOTPAGE
Lloh16:
	ldr	x24, [x24, _SHA_REG_MODE_HMAC_OUTER_HASH@GOTPAGEOFF]
	cbz	w23, LBB0_6
; %bb.4:
	ldr	w8, [x25]
	orr	w21, w8, w21
	ldr	w23, [x22]
Lloh17:
	adrp	x8, _FLAGS_HMAC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FLAGS_HMAC@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x24]
	orr	w21, w8, w21
LBB0_6:
	ldr	w8, [x27]
	ldr	w9, [x25]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _SHA_REG_MODE_ALGO_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SHA_REG_MODE_ALGO_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w23, w8, w9
	ldr	w0, [x19]
	ldr	w3, [x22]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	mov	x0, x19
	bl	_SHA_REG_MODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	mov	x3, x23
	bl	_omap_sham_write_mask
Lloh25:
	adrp	x8, _SHA_REG_IRQENA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SHA_REG_IRQENA@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _SHA_REG_IRQENA_OUTPUT_RDY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SHA_REG_IRQENA_OUTPUT_RDY@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_omap_sham_write
	mov	x0, x19
	bl	_SHA_REG_MASK
	mov	x1, x0
Lloh31:
	adrp	x8, _SHA_REG_MASK_IT_EN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SHA_REG_MASK_IT_EN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _SHA_REG_MASK_DMA_EN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SHA_REG_MASK_DMA_EN@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w10, wzr, w9, eq
	orr	w2, w10, w8
	orr	w3, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_omap_sham_write_mask
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAGS_MODE_MASK,4,2            ; @FLAGS_MODE_MASK
	.comm	_FLAGS_MODE_SHIFT,4,2           ; @FLAGS_MODE_SHIFT
	.comm	_SHA_REG_MODE_ALGO_CONSTANT,4,2 ; @SHA_REG_MODE_ALGO_CONSTANT
	.comm	_FLAGS_HMAC,4,2                 ; @FLAGS_HMAC
	.comm	_SHA_REG_MODE_HMAC_KEY_PROC,4,2 ; @SHA_REG_MODE_HMAC_KEY_PROC
	.comm	_SHA_REG_MODE_CLOSE_HASH,4,2    ; @SHA_REG_MODE_CLOSE_HASH
	.comm	_SHA_REG_MODE_HMAC_OUTER_HASH,4,2 ; @SHA_REG_MODE_HMAC_OUTER_HASH
	.comm	_SHA_REG_MODE_ALGO_MASK,4,2     ; @SHA_REG_MODE_ALGO_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ctrl: %08x, flags: %08lx\n"

	.comm	_SHA_REG_IRQENA,4,2             ; @SHA_REG_IRQENA
	.comm	_SHA_REG_IRQENA_OUTPUT_RDY,4,2  ; @SHA_REG_IRQENA_OUTPUT_RDY
	.comm	_SHA_REG_MASK_IT_EN,4,2         ; @SHA_REG_MASK_IT_EN
	.comm	_SHA_REG_MASK_DMA_EN,4,2        ; @SHA_REG_MASK_DMA_EN
	.no_dead_strip	_omap_sham_write_ctrl_omap4
.subsections_via_symbols
