	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_instantiate_key_common  ## -- Begin function keyctl_instantiate_key_common
	.p2align	4, 0x90
_keyctl_instantiate_key_common:         ## @keyctl_instantiate_key_common
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_current_cred
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_kenter
	cmpq	$1048575, %r15                  ## imm = 0xFFFFF
	jbe	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	jmp	LBB0_19
LBB0_2:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.3:
	movq	(%rbx), %rcx
	movq	(%rcx), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_19
## %bb.4:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_5
## %bb.6:
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	xorl	%r13d, %r13d
	subq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %r12
	movq	%r15, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
LBB0_10:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_copy_from_user_iovec
	testq	%rax, %rax
	js	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r15, %r12
LBB0_12:
	leaq	-80(%rbp), %rdx
	movq	%rcx, %r14
	movq	%rcx, %rsi
	callq	_get_instantiation_keyring
	testq	%rax, %rax
	js	LBB0_13
## %bb.14:
	movq	(%r14), %rdi
	movq	-80(%rbp), %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	%rbx, %r8
	callq	_key_instantiate_and_link
	movq	%rax, %r13
	movq	-80(%rbp), %rdi
	callq	_key_put
	testq	%r13, %r13
	jne	LBB0_16
## %bb.15:
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_keyctl_change_reqkey_auth
	jmp	LBB0_16
LBB0_13:
	movq	%rax, %r13
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	callq	_vfree
	jmp	LBB0_19
LBB0_17:
	callq	_kfree
	jmp	LBB0_19
LBB0_7:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jae	LBB0_19
## %bb.8:
	movq	%r12, %rdi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.9:
	movl	$1, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	jmp	LBB0_10
LBB0_19:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d,,%zu,%d"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_keyctl_instantiate_key_common  ; -- Begin function keyctl_instantiate_key_common
	.p2align	2
_keyctl_instantiate_key_common:         ; @keyctl_instantiate_key_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x19, x3
	mov	x25, x2
	mov	x26, x1
	mov	x21, x0
	bl	_current_cred
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_kenter
	lsr	x8, x19, #20
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x23, x8
	b	LBB0_19
LBB0_2:
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	neg	x23, x8
	ldr	x22, [x22]
	cbz	x22, LBB0_19
; %bb.3:
	ldr	x24, [x22]
	ldr	x8, [x24]
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_19
; %bb.4:
	cbz	x26, LBB0_8
; %bb.5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	x23, [x8]
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kmalloc
	cbz	x0, LBB0_16
; %bb.6:
	mov	x21, x0
	mov	w27, #0
LBB0_7:
	mov	x0, x21
	mov	x1, x26
	mov	x2, x25
	bl	_copy_from_user_iovec
	tbz	x0, #63, LBB0_9
	b	LBB0_12
LBB0_8:
	mov	x21, #0
	mov	w27, #0
LBB0_9:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x24
	bl	_get_instantiation_keyring
	tbnz	x0, #63, LBB0_12
; %bb.10:
	ldr	x0, [x24]
	ldr	x3, [sp, #8]
	mov	x1, x21
	mov	x2, x19
	mov	x4, x22
	bl	_key_instantiate_and_link
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_key_put
	cbnz	x23, LBB0_13
; %bb.11:
	mov	x0, #0
	bl	_keyctl_change_reqkey_auth
	b	LBB0_13
LBB0_12:
	mov	x23, x0
LBB0_13:
	mov	x0, x21
	cbz	w27, LBB0_15
; %bb.14:
	bl	_vfree
	b	LBB0_19
LBB0_15:
	bl	_kfree
	b	LBB0_19
LBB0_16:
	neg	x23, x23
Lloh14:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x19
	b.hs	LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_vmalloc
	cbz	x0, LBB0_19
; %bb.18:
	mov	x21, x0
	mov	w27, #1
	b	LBB0_7
LBB0_19:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d,,%zu,%d"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
