	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spkm3_read_token               ## -- Begin function spkm3_read_token
	.p2align	4, 0x90
_spkm3_read_token:                      ## @spkm3_read_token
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -128(%rbp)
	movl	$0, -120(%rbp)
	movq	(%rsi), %rax
	movq	%rax, -80(%rbp)
	movq	_GSS_S_DEFECTIVE_TOKEN@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	addq	$8, %rdi
	movl	8(%rsi), %ecx
	leaq	-132(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	callq	_g_verify_token_header
	testq	%rax, %rax
	jne	LBB0_15
## %bb.1:
	movq	_SPKM_MIC_TOK@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.3:
	leaq	-80(%rbp), %rdi
	leaq	-84(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	callq	_spkm3_verify_mic_token
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.4:
	movq	-72(%rbp), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, -72(%rbp)
	cmpb	$3, (%rsi)
	jne	LBB0_5
## %bb.6:
	leaq	2(%rsi), %rax
	movq	%rax, -72(%rbp)
	movzbl	1(%rsi), %edx
	addq	$3, %rsi
	movq	%rsi, -72(%rbp)
	decl	%edx
	leaq	-112(%rbp), %rdi
	movl	$16, %ecx
	callq	_decode_asn1_bitstring
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	(%r13), %r15d
	leaq	4(%r12), %rdi
	movq	_hmac_md5_oid@GOTPCREL(%rip), %rsi
	callq	_g_OID_equal
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movq	_CKSUMTYPE_HMAC_MD5@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-80(%rbp), %rdx
	addq	$2, %rdx
	movl	-84(%rbp), %ecx
	addl	$2, %ecx
	leaq	-128(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r12, %rsi
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_make_spkm3_checksum
	testq	%rax, %rax
	jne	LBB0_15
## %bb.12:
	movq	_GSS_S_BAD_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-128(%rbp), %rdi
	movq	-112(%rbp), %rsi
	movl	-104(%rbp), %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_15:
	movq	-112(%rbp), %rdi
	callq	_kfree
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%r15d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
LBB0_10:
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_15
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_10
LBB0_14:
	movq	_GSS_S_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GSS_S_DEFECTIVE_TOKEN,4,2      ## @GSS_S_DEFECTIVE_TOKEN
	.comm	_SPKM_MIC_TOK,4,2               ## @SPKM_MIC_TOK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RPC:       BAD SPKM3 token type: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"RPC:       spkm3_read_token BAD checksum type\n"

	.comm	_hmac_md5_oid,4,2               ## @hmac_md5_oid
L_.str.2:                               ## @.str.2
	.asciz	"RPC:       gss_spkm3_seal: unsupported I-ALG algorithm\n"

	.comm	_CKSUMTYPE_HMAC_MD5,8,3         ## @CKSUMTYPE_HMAC_MD5
	.comm	_GSS_S_BAD_SIG,4,2              ## @GSS_S_BAD_SIG
L_.str.3:                               ## @.str.3
	.asciz	"RPC:       bad MIC checksum\n"

	.comm	_GSS_S_COMPLETE,4,2             ## @GSS_S_COMPLETE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spkm3_read_token               ; -- Begin function spkm3_read_token
	.p2align	2
_spkm3_read_token:                      ; @spkm3_read_token
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x22, x3
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	stp	xzr, xzr, [sp, #56]
	add	x8, sp, #72
	str	x8, [sp, #40]
	str	wzr, [sp, #48]
	ldr	x8, [x1]
	str	x8, [sp, #32]
Lloh3:
	adrp	x23, _GSS_S_DEFECTIVE_TOKEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GSS_S_DEFECTIVE_TOKEN@GOTPAGEOFF]
	ldr	w19, [x23]
	add	x0, x0, #8
	ldr	w3, [x1, #8]
	add	x1, sp, #20
	add	x2, sp, #32
	bl	_g_verify_token_header
	cbnz	x0, LBB0_11
; %bb.1:
Lloh5:
	adrp	x8, _SPKM_MIC_TOK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPKM_MIC_TOK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_9
; %bb.2:
	add	x0, sp, #32
	add	x1, sp, #16
	add	x2, sp, #24
	bl	_spkm3_verify_mic_token
	mov	x19, x0
	cbnz	w0, LBB0_11
; %bb.3:
	ldr	x8, [sp, #24]
	add	x9, x8, #1
	str	x9, [sp, #24]
	ldrb	w9, [x8]
	cmp	w9, #3
	b.ne	LBB0_13
; %bb.4:
	add	x9, x8, #2
	str	x9, [sp, #24]
	ldrb	w9, [x8, #1]
	add	x1, x8, #3
	str	x1, [sp, #24]
	sub	w2, w9, #1
	add	x0, sp, #56
	mov	w3, #16
	bl	_decode_asn1_bitstring
	cbz	w0, LBB0_14
; %bb.5:
	ldr	w19, [x23]
	add	x0, x21, #4
Lloh8:
	adrp	x1, _hmac_md5_oid@GOTPAGE
Lloh9:
	ldr	x1, [x1, _hmac_md5_oid@GOTPAGEOFF]
	bl	_g_OID_equal
	cbz	w0, LBB0_15
; %bb.6:
Lloh10:
	adrp	x8, _CKSUMTYPE_HMAC_MD5@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CKSUMTYPE_HMAC_MD5@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x8]
	ldr	x8, [sp, #32]
	add	x2, x8, #2
	ldr	w8, [sp, #16]
	add	w3, w8, #2
	add	x6, sp, #40
	mov	x1, x21
	mov	x4, x20
	mov	w5, #0
	bl	_make_spkm3_checksum
	cbnz	x0, LBB0_11
; %bb.7:
Lloh13:
	adrp	x8, _GSS_S_BAD_SIG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GSS_S_BAD_SIG@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	ldr	x0, [sp, #40]
	ldr	x1, [sp, #56]
	ldr	w2, [sp, #64]
	bl	_memcmp
	cbz	x0, LBB0_16
; %bb.8:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
	str	x22, [sp]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_dprintk
LBB0_11:
	ldr	x0, [sp, #56]
	bl	_kfree
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.12:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_13:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
LBB0_14:
	mov	w19, #0
	b	LBB0_11
LBB0_15:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_16:
Lloh27:
	adrp	x8, _GSS_S_COMPLETE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GSS_S_COMPLETE@GOTPAGEOFF]
Lloh29:
	ldr	w19, [x8]
	b	LBB0_11
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GSS_S_DEFECTIVE_TOKEN,4,2      ; @GSS_S_DEFECTIVE_TOKEN
	.comm	_SPKM_MIC_TOK,4,2               ; @SPKM_MIC_TOK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RPC:       BAD SPKM3 token type: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"RPC:       spkm3_read_token BAD checksum type\n"

	.comm	_hmac_md5_oid,4,2               ; @hmac_md5_oid
l_.str.2:                               ; @.str.2
	.asciz	"RPC:       gss_spkm3_seal: unsupported I-ALG algorithm\n"

	.comm	_CKSUMTYPE_HMAC_MD5,8,3         ; @CKSUMTYPE_HMAC_MD5
	.comm	_GSS_S_BAD_SIG,4,2              ; @GSS_S_BAD_SIG
l_.str.3:                               ; @.str.3
	.asciz	"RPC:       bad MIC checksum\n"

	.comm	_GSS_S_COMPLETE,4,2             ; @GSS_S_COMPLETE
.subsections_via_symbols
