	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nx_crypto_ctx_init
_nx_crypto_ctx_init:                    ## @nx_crypto_ctx_init
	.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	_nx_driver@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_NX_OKAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_NX_MODE_AES_GCM@GOTPCREL(%rip), %rdx
	movq	_NX_MODE_AES_CCM@GOTPCREL(%rip), %rcx
	movq	_NX_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	cmpq	%r15, (%rcx)
	leal	(,%rax,4), %edi
	leal	(%rax,%rax,4), %eax
	cmovel	%eax, %edi
	cmpq	%r15, (%rdx)
	cmovel	%eax, %edi
	addl	$4, %edi
	movl	%edi, (%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_round_up
	movq	%rax, 40(%rbx)
	movslq	(%r13), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 32(%rbx)
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 16(%rbx)
	movq	_NX_MODE_AES_GCM@GOTPCREL(%rip), %rdx
	cmpq	%r15, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_NX_MODE_AES_CCM@GOTPCREL(%rip), %rdx
	cmpq	%r15, (%rdx)
	jne	LBB0_8
LBB0_7:
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 24(%rbx)
LBB0_8:
	leaq	16(%r12), %rax
	movq	%rax, 8(%rbx)
	movl	4(%rbx), %edi
	movq	8(%r12), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax,%r15,4), %esi
	movl	$12, %edx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nx_driver,24,3                 ## @nx_driver
	.comm	_NX_OKAY,8,3                    ## @NX_OKAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to initialize NX crypto context while device is not available!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NX_MODE_AES_GCM,8,3            ## @NX_MODE_AES_GCM
	.comm	_NX_MODE_AES_CCM,8,3            ## @NX_MODE_AES_CCM
	.comm	_NX_PAGE_SIZE,4,2               ## @NX_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_nx_crypto_ctx_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nx_crypto_ctx_init
_nx_crypto_ctx_init:                    ; @nx_crypto_ctx_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x22, _nx_driver@GOTPAGE
Lloh1:
	ldr	x22, [x22, _nx_driver@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _NX_OKAY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NX_OKAY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh5:
	adrp	x24, _NX_MODE_AES_GCM@GOTPAGE
Lloh6:
	ldr	x24, [x24, _NX_MODE_AES_GCM@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh7:
	adrp	x23, _NX_MODE_AES_CCM@GOTPAGE
Lloh8:
	ldr	x23, [x23, _NX_MODE_AES_CCM@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x9, x2
	ccmp	x8, x2, #4, ne
Lloh9:
	adrp	x25, _NX_PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _NX_PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	w9, w8, #2
	add	w8, w9, w8
	csel	w8, w8, w9, eq
	add	w0, w8, #4
	str	w0, [x21]
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x21, #48]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w1, [x25]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_round_up
	ldrsw	x8, [x25]
	lsl	x9, x8, #2
	add	x10, x0, x9
	add	x9, x10, x9
	stp	x10, x0, [x21, #32]
	str	x9, [x21, #16]
	ldr	x10, [x24]
	cmp	x10, x19
	b.eq	LBB0_4
; %bb.3:
	ldr	x10, [x23]
	cmp	x10, x19
	b.ne	LBB0_5
LBB0_4:
	add	x8, x9, x8, lsl #2
	str	x8, [x21, #24]
LBB0_5:
	add	x8, x22, #16
	str	x8, [x21, #8]
	ldr	w0, [x21, #4]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w1, [x8, x19, lsl #2]
	mov	w2, #12
	bl	_memcpy
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_nx_driver,24,3                 ; @nx_driver
	.comm	_NX_OKAY,8,3                    ; @NX_OKAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to initialize NX crypto context while device is not available!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NX_MODE_AES_GCM,8,3            ; @NX_MODE_AES_GCM
	.comm	_NX_MODE_AES_CCM,8,3            ; @NX_MODE_AES_CCM
	.comm	_NX_PAGE_SIZE,4,2               ; @NX_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_nx_crypto_ctx_init
.subsections_via_symbols
