	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_geliboot_crypt                 ## -- Begin function geliboot_crypt
	.p2align	4, 0x90
_geliboot_crypt:                        ## @geliboot_crypt
	.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
	movq	%r9, %rbx
	movq	%r8, %r15
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %eax
	cmpl	$128, %edi
	je	LBB0_6
## %bb.1:
	movl	%edi, %esi
	cmpl	$129, %edi
	jne	LBB0_12
## %bb.2:
	xorl	%esi, %esi
	movl	%eax, %r13d
	testl	%eax, %eax
	sete	%sil
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_rijndael_makeKey
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movq	_MODE_CBC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdi
	movq	16(%rbp), %rdx
	callq	_rijndael_cipherInit
	testl	%eax, %eax
	js	LBB0_19
## %bb.4:
	leaq	(,%r14,8), %rcx
	leaq	-52(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r12, %r8
	testl	%r13d, %r13d
	je	LBB0_21
## %bb.5:
	callq	_rijndael_blockEncrypt
	jmp	LBB0_22
LBB0_6:
	leaq	-44(%rbp), %rdi
	movabsq	$9223372036854775807, %r13      ## imm = 0x7FFFFFFFFFFFFFFF
	andq	%rbx, %r13
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	callq	_rijndael_set_key
	shrq	%rbx
	movabsq	$4611686018427387900, %rsi      ## imm = 0x3FFFFFFFFFFFFFFC
	andq	%rbx, %rsi
	addq	%r15, %rsi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_rijndael_set_key
	movq	_enc_xform_aes_xts@GOTPCREL(%rip), %r13
	movl	%ebx, %edi
	movq	16(%rbp), %rsi
	callq	*16(%r13)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_15
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_23
## %bb.8:
	testq	%r14, %r14
	je	LBB0_23
## %bb.9:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%rax,4), %rsi
	movl	%ebx, %edi
	callq	*(%r13)
	movq	_AES_XTS_BLOCKSIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movslq	%r15d, %rax
	addq	%rcx, %rax
	movl	%eax, %r15d
	cmpq	%r14, %rax
	jb	LBB0_10
	jmp	LBB0_11
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_13:
	movl	$1, %ebx
	jmp	LBB0_23
LBB0_14:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_20
LBB0_15:
	testq	%r14, %r14
	je	LBB0_23
## %bb.16:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%rax,4), %rsi
	movl	%ebx, %edi
	callq	*8(%r13)
	movq	_AES_XTS_BLOCKSIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movslq	%r15d, %rax
	addq	%rcx, %rax
	movl	%eax, %r15d
	cmpq	%r14, %rax
	jb	LBB0_17
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_19:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_20:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_23
LBB0_21:
	callq	_rijndael_blockDecrypt
LBB0_22:
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	xorl	%ebx, %ebx
	cmpq	%r14, %rcx
	jne	LBB0_24
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to setup decryption keys: %d\n"

	.comm	_MODE_CBC,4,2                   ## @MODE_CBC
L_.str.1:                               ## @.str.1
	.asciz	"Failed to setup IV: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to decrypt the entire input: %u != %zu\n"

	.comm	_enc_xform_aes_xts,24,3         ## @enc_xform_aes_xts
	.comm	_AES_XTS_BLOCKSIZE,4,2          ## @AES_XTS_BLOCKSIZE
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported crypto algorithm #%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_geliboot_crypt                 ; -- Begin function geliboot_crypt
	.p2align	2
_geliboot_crypt:                        ; @geliboot_crypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x6
	mov	x24, x5
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	cmp	w0, #128
	b.eq	LBB0_6
; %bb.1:
	mov	x1, x0
	cmp	w0, #129
	b.ne	LBB0_11
; %bb.2:
	cmp	w21, #0
	cset	w1, eq
	add	x0, sp, #16
	mov	x2, x24
	mov	x3, x23
	bl	_rijndael_makeKey
	tbnz	w0, #31, LBB0_13
; %bb.3:
Lloh0:
	adrp	x8, _MODE_CBC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODE_CBC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #28
	mov	x2, x22
	bl	_rijndael_cipherInit
	tbnz	w0, #31, LBB0_17
; %bb.4:
	lsl	x3, x19, #3
	add	x0, sp, #28
	add	x1, sp, #16
	mov	x2, x20
	mov	x4, x20
	cbz	w21, LBB0_19
; %bb.5:
	bl	_rijndael_blockEncrypt
	b	LBB0_20
LBB0_6:
	add	x8, sp, #16
	orr	x0, x8, #0x4
	and	x25, x24, #0x7fffffffffffffff
	mov	x1, x23
	mov	x2, x25
	bl	_rijndael_set_key
	ubfx	x8, x24, #3, #60
	add	x1, x23, x8, lsl #2
	add	x0, sp, #16
	mov	x2, x25
	bl	_rijndael_set_key
Lloh3:
	adrp	x23, _enc_xform_aes_xts@GOTPAGE
Lloh4:
	ldr	x23, [x23, _enc_xform_aes_xts@GOTPAGEOFF]
	ldr	x8, [x23, #16]
	add	x0, sp, #16
	mov	x1, x22
	blr	x8
	cbz	w21, LBB0_14
; %bb.7:
	cmp	w21, #1
	b.ne	LBB0_21
; %bb.8:
	cbz	x19, LBB0_21
; %bb.9:
	mov	x8, #0
	mov	w22, #0
Lloh5:
	adrp	x21, _AES_XTS_BLOCKSIZE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AES_XTS_BLOCKSIZE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	add	x1, x20, x8, lsl #2
	add	x0, sp, #16
	blr	x9
	ldrsw	x8, [x21]
	add	x8, x8, w22, sxtw
	mov	x22, x8
	cmp	x8, x19
	b.lo	LBB0_10
	b	LBB0_21
LBB0_11:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	bl	_printf
	mov	w23, #1
	b	LBB0_22
LBB0_13:
	mov	x23, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_18
LBB0_14:
	cbz	x19, LBB0_21
; %bb.15:
	mov	x8, #0
	mov	w22, #0
Lloh11:
	adrp	x21, _AES_XTS_BLOCKSIZE@GOTPAGE
Lloh12:
	ldr	x21, [x21, _AES_XTS_BLOCKSIZE@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, #8]
	add	x1, x20, x8, lsl #2
	add	x0, sp, #16
	blr	x9
	ldrsw	x8, [x21]
	add	x8, x8, w22, sxtw
	mov	x22, x8
	cmp	x8, x19
	b.lo	LBB0_16
	b	LBB0_21
LBB0_17:
	mov	x23, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_18:
	mov	x1, x23
	bl	_printf
	b	LBB0_22
LBB0_19:
	bl	_rijndael_blockDecrypt
LBB0_20:
	mov	x1, x0
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	sbfx	x8, x8, #3, #29
	cmp	x8, x19
	b.ne	LBB0_23
LBB0_21:
	mov	w23, #0
LBB0_22:
	mov	x0, x23
	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
	add	sp, sp, #112
	ret
LBB0_23:
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to setup decryption keys: %d\n"

	.comm	_MODE_CBC,4,2                   ; @MODE_CBC
l_.str.1:                               ; @.str.1
	.asciz	"Failed to setup IV: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to decrypt the entire input: %u != %zu\n"

	.comm	_enc_xform_aes_xts,24,3         ; @enc_xform_aes_xts
	.comm	_AES_XTS_BLOCKSIZE,4,2          ; @AES_XTS_BLOCKSIZE
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported crypto algorithm #%d\n"

.subsections_via_symbols
