	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kcm_ccache_alloc
_kcm_ccache_alloc:                      ## @kcm_ccache_alloc
	.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	%rsi, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	$0, (%rdx)
	movq	_ccache_mutex@GOTPCREL(%rip), %rdi
	callq	_HEIMDAL_MUTEX_lock
	movq	_ccache_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	xorl	%r14d, %r14d
	movq	_KCM_FLAGS_VALID@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r14, %r14
	cmoveq	%rbx, %r14
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	88(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	72(%rbx), %rdi
	movq	%r15, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movq	_KRB5_CC_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%r13d, %r13d
	testq	%r12, %r12
	jne	LBB0_5
LBB0_10:
	xorl	%r12d, %r12d
	movl	$0, %r13d
	testq	%r14, %r14
	jne	LBB0_14
LBB0_11:
	movl	$96, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r14
	movq	_ccache_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 88(%r14)
	movq	%r14, %rdi
	addq	$20, %rdi
	callq	_HEIMDAL_MUTEX_init
	movl	$1, %r13d
	movb	$1, %r12b
LBB0_14:
	movl	80(%r14), %edi
	movl	$4, %esi
	callq	_RAND_bytes
	movq	%r15, %rdi
	callq	_strdup
	movq	%rax, 72(%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movl	$1, 4(%r14)
	movq	_KCM_FLAGS_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%r14)
	movq	$-1, 12(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	movups	%xmm0, 40(%r14)
	movups	%xmm0, 56(%r14)
	testb	%r12b, %r12b
	je	LBB0_18
## %bb.17:
	movq	_ccache_head@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
LBB0_18:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	_ccache_mutex@GOTPCREL(%rip), %rdi
	callq	_HEIMDAL_MUTEX_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_19
LBB0_15:
	movq	_KRB5_CC_NOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_5
LBB0_12:
	movq	_KRB5_CC_NOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
LBB0_5:
	movq	_ccache_mutex@GOTPCREL(%rip), %rdi
	callq	_HEIMDAL_MUTEX_unlock
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.6:
	testq	%r14, %r14
	je	LBB0_19
## %bb.7:
	leaq	20(%r14), %rdi
	callq	_HEIMDAL_MUTEX_destroy
	movq	%r14, %rdi
	callq	_free
LBB0_19:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ccache_mutex,4,2               ## @ccache_mutex
	.comm	_ccache_head,8,3                ## @ccache_head
	.comm	_KCM_FLAGS_VALID,4,2            ## @KCM_FLAGS_VALID
	.comm	_KRB5_CC_WRITE,8,3              ## @KRB5_CC_WRITE
	.comm	_KRB5_CC_NOMEM,8,3              ## @KRB5_CC_NOMEM
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.no_dead_strip	_kcm_ccache_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kcm_ccache_alloc
_kcm_ccache_alloc:                      ; @kcm_ccache_alloc
	.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
	mov	x20, x2
	mov	x21, x1
	str	xzr, [x2]
Lloh0:
	adrp	x0, _ccache_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ccache_mutex@GOTPAGEOFF]
	bl	_HEIMDAL_MUTEX_lock
Lloh2:
	adrp	x23, _ccache_head@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ccache_head@GOTPAGEOFF]
	ldr	x22, [x23]
Lloh4:
	adrp	x24, _KCM_FLAGS_VALID@GOTPAGE
Lloh5:
	ldr	x24, [x24, _KCM_FLAGS_VALID@GOTPAGEOFF]
	cbz	x22, LBB0_10
; %bb.1:
	mov	x19, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x19, #0
	csel	x19, x22, x19, eq
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x22, [x22, #88]
	cbz	x22, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x22, #72]
	mov	x1, x21
	bl	_strcmp
	cbnz	x0, LBB0_3
; %bb.6:
Lloh6:
	adrp	x8, _KRB5_CC_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KRB5_CC_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	x22, [x8]
	cbz	x22, LBB0_8
; %bb.7:
	mov	w25, #0
	b	LBB0_18
LBB0_8:
	cbz	x19, LBB0_10
; %bb.9:
	mov	w25, #0
	b	LBB0_12
LBB0_10:
	mov	w0, #96
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.11:
	ldr	x8, [x23]
	str	x8, [x19, #88]
	add	x0, x19, #20
	bl	_HEIMDAL_MUTEX_init
	mov	w25, #1
LBB0_12:
	ldr	w0, [x19, #80]
	mov	w1, #4
	bl	_RAND_bytes
	mov	x0, x21
	bl	_strdup
	str	x0, [x19, #72]
	cbz	x0, LBB0_17
; %bb.13:
	mov	w8, #1
	ldr	w9, [x24]
	stp	w9, w8, [x19]
Lloh9:
	adrp	x8, _S_IRUSR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S_IRUSR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	movi.2d	v0, #0xffffffffffffffff
	stur	d0, [x19, #12]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #24]
	stur	q0, [x19, #40]
	stur	q0, [x19, #56]
	cbz	w25, LBB0_15
; %bb.14:
	str	x19, [x23]
LBB0_15:
	str	x19, [x20]
Lloh15:
	adrp	x0, _ccache_mutex@GOTPAGE
Lloh16:
	ldr	x0, [x0, _ccache_mutex@GOTPAGEOFF]
	bl	_HEIMDAL_MUTEX_unlock
	mov	x22, #0
	b	LBB0_21
LBB0_16:
	mov	w25, #0
LBB0_17:
Lloh17:
	adrp	x8, _KRB5_CC_NOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KRB5_CC_NOMEM@GOTPAGEOFF]
Lloh19:
	ldr	x22, [x8]
LBB0_18:
Lloh20:
	adrp	x0, _ccache_mutex@GOTPAGE
Lloh21:
	ldr	x0, [x0, _ccache_mutex@GOTPAGEOFF]
	bl	_HEIMDAL_MUTEX_unlock
	cbz	w25, LBB0_21
; %bb.19:
	cbz	x19, LBB0_21
; %bb.20:
	add	x0, x19, #20
	bl	_HEIMDAL_MUTEX_destroy
	mov	x0, x19
	bl	_free
LBB0_21:
	mov	x0, x22
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ccache_mutex,4,2               ; @ccache_mutex
	.comm	_ccache_head,8,3                ; @ccache_head
	.comm	_KCM_FLAGS_VALID,4,2            ; @KCM_FLAGS_VALID
	.comm	_KRB5_CC_WRITE,8,3              ; @KRB5_CC_WRITE
	.comm	_KRB5_CC_NOMEM,8,3              ; @KRB5_CC_NOMEM
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.no_dead_strip	_kcm_ccache_alloc
.subsections_via_symbols
