	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_des_write_ctrl
_omap_des_write_ctrl:                   ## @omap_des_write_ctrl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_omap_des_hw_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	16(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, %r13d
	sarl	$2, %r13d
	cmpl	$4, %eax
	jb	LBB0_4
## %bb.2:
	cmpl	$2, %r13d
	movl	$1, %r15d
	cmovael	%r13d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_DES_REG_KEY
	movl	%eax, %r14d
	movq	16(%r12), %rax
	movq	8(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	callq	___le32_to_cpu
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_omap_des_write
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
LBB0_4:
	movl	(%r12), %eax
	movq	_FLAGS_CBC@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	8(%r12), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_DES_REG_IV
	movq	8(%r12), %rcx
	movq	(%rcx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$2, %ecx
	callq	_omap_des_write_n
	movl	(%r12), %eax
	movq	_DES_REG_CTRL_CBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%r14d, %ecx
	testl	%eax, (%rbx)
	jne	LBB0_10
	jmp	LBB0_9
LBB0_5:
	movq	_DES_REG_CTRL_CBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_9:
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_7:
	movq	_DES_REG_CTRL_CBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%r14d, %ecx
LBB0_10:
	movq	_FLAGS_ENCRYPT@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	movq	_DES_REG_CTRL_DIRECTION@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmovnel	%edx, %eax
	xorl	%r15d, %r15d
	cmpl	$6, %r13d
	movq	_DES_REG_CTRL_TDES@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	$0, %ebx
	cmovel	%esi, %ebx
	orl	%ecx, %ebx
	orl	%eax, %ebx
	orl	%edx, %r14d
	orl	%esi, %r14d
	movq	%r12, %rdi
	callq	_DES_REG_CTRL
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_omap_des_write_mask
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAGS_CBC,4,2                  ## @FLAGS_CBC
	.comm	_DES_REG_CTRL_CBC,4,2           ## @DES_REG_CTRL_CBC
	.comm	_FLAGS_ENCRYPT,4,2              ## @FLAGS_ENCRYPT
	.comm	_DES_REG_CTRL_DIRECTION,4,2     ## @DES_REG_CTRL_DIRECTION
	.comm	_DES_REG_CTRL_TDES,4,2          ## @DES_REG_CTRL_TDES
	.no_dead_strip	_omap_des_write_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_des_write_ctrl
_omap_des_write_ctrl:                   ; @omap_des_write_ctrl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_omap_des_hw_init
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	asr	w22, w8, #2
	cmp	w8, #4
	b.lo	LBB0_4
; %bb.2:
	mov	x20, #0
	cmp	w22, #1
	csinc	w23, w22, wzr, hi
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_DES_REG_KEY
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, x20, lsl #2]
	bl	___le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_omap_des_write
	add	x20, x20, #1
	cmp	x23, x20
	b.ne	LBB0_3
LBB0_4:
	ldr	w8, [x19]
Lloh0:
	adrp	x20, _FLAGS_CBC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FLAGS_CBC@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	cbz	x9, LBB0_9
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	bl	_DES_REG_IV
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	x2, [x8]
	mov	x0, x19
	mov	w3, #2
	bl	_omap_des_write_n
	ldr	w8, [x19]
	ldr	w11, [x20]
Lloh2:
	adrp	x9, _DES_REG_CTRL_CBC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DES_REG_CTRL_CBC@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mov	x10, x9
	tst	w11, w8
	b.ne	LBB0_10
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x9, _DES_REG_CTRL_CBC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DES_REG_CTRL_CBC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
LBB0_8:
	mov	w10, #0
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x9, _DES_REG_CTRL_CBC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DES_REG_CTRL_CBC@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mov	x10, x9
LBB0_10:
Lloh11:
	adrp	x11, _FLAGS_ENCRYPT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _FLAGS_ENCRYPT@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
Lloh14:
	adrp	x12, _DES_REG_CTRL_DIRECTION@GOTPAGE
Lloh15:
	ldr	x12, [x12, _DES_REG_CTRL_DIRECTION@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	tst	w11, w8
	csel	w8, wzr, w12, eq
	orr	w8, w8, w10
Lloh17:
	adrp	x10, _DES_REG_CTRL_TDES@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DES_REG_CTRL_TDES@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w22, #6
	csel	w11, w10, wzr, eq
	orr	w20, w8, w11
	orr	w8, w12, w9
	orr	w21, w8, w10
	mov	x0, x19
	bl	_DES_REG_CTRL
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_omap_des_write_mask
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAGS_CBC,4,2                  ; @FLAGS_CBC
	.comm	_DES_REG_CTRL_CBC,4,2           ; @DES_REG_CTRL_CBC
	.comm	_FLAGS_ENCRYPT,4,2              ; @FLAGS_ENCRYPT
	.comm	_DES_REG_CTRL_DIRECTION,4,2     ; @DES_REG_CTRL_DIRECTION
	.comm	_DES_REG_CTRL_TDES,4,2          ; @DES_REG_CTRL_TDES
	.no_dead_strip	_omap_des_write_ctrl
.subsections_via_symbols
