	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kcm_ccache_acquire             ## -- Begin function kcm_ccache_acquire
	.p2align	4, 0x90
_kcm_ccache_acquire:                    ## @kcm_ccache_acquire
	.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	%rdx, %r12
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_KCM_ASSERT_VALID
	movl	(%r14), %eax
	movq	_KCM_FLAGS_USE_CACHED_KEY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	cmpq	$0, 40(%r14)
	jne	LBB0_7
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movq	_KCM_FLAGS_USE_KEYTAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_29
## %bb.4:
	cmpq	$0, 32(%r14)
	jne	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movl	%r15d, %edi
	callq	_krb5_abortx
LBB0_7:
	leaq	24(%r14), %rbx
	movq	%rbx, %rdi
	callq	_HEIMDAL_MUTEX_lock
	leaq	-76(%rbp), %rdx
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_kcm_internal_ccache
	movq	56(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	leaq	-64(%rbp), %rdx
	movl	%r15d, %edi
	callq	_krb5_unparse_name
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %r13
	movl	28(%r14), %ebx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_krb5_get_err_text
	leaq	L_.str.3(%rip), %rsi
	xorl	%edi, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_kcm_log
	jmp	LBB0_28
LBB0_10:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	movl	48(%r14), %esi
	movl	%r15d, %edi
	callq	_krb5_principal_get_realm
	movl	%eax, %r12d
	leaq	-56(%rbp), %rsi
	movl	%r15d, %edi
	callq	_krb5_get_init_creds_opt_alloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_11
LBB0_25:
	movq	-56(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.26:
	movl	%r15d, %edi
	callq	_krb5_get_init_creds_opt_free
LBB0_27:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_HEIMDAL_MUTEX_unlock
	jmp	LBB0_28
LBB0_11:
	movq	-56(%rbp), %rcx
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	movl	%r12d, %edx
	callq	_krb5_get_init_creds_opt_set_default_flags
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rdi
	callq	_krb5_get_init_creds_opt_set_tkt_life
LBB0_13:
	movq	16(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	movq	-56(%rbp), %rdi
	callq	_krb5_get_init_creds_opt_set_renew_life
LBB0_15:
	movq	_KCM_FLAGS_USE_CACHED_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	48(%r14), %edx
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.16:
	leaq	40(%r14), %rcx
	movq	-64(%rbp), %r9
	movq	-56(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	xorl	%r8d, %r8d
	callq	_krb5_get_init_creds_keyblock
	jmp	LBB0_18
LBB0_29:
	movl	28(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_kcm_log
	movq	_KRB5_FCC_INTERNAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_28:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	32(%r14), %rcx
	movq	-64(%rbp), %r9
	movq	-56(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	xorl	%r8d, %r8d
	callq	_krb5_get_init_creds_keytab
LBB0_18:
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movl	28(%r14), %ebx
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_krb5_get_err_text
	leaq	L_.str.5(%rip), %rsi
	xorl	%edi, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_kcm_log
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.20:
	callq	_free
	jmp	LBB0_25
LBB0_21:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	callq	_free
LBB0_23:
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_kcm_ccache_remove_creds_internal
	leaq	-44(%rbp), %rdx
	xorl	%r13d, %r13d
	movl	%r15d, %edi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_kcm_ccache_store_cred_internal
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	%rax, %r12
	movl	28(%r14), %ebx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_krb5_get_err_text
	leaq	L_.str.6(%rip), %rsi
	xorl	%edi, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_kcm_log
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	callq	_krb5_free_cred_contents
	movq	%r12, %r13
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_KCM_FLAGS_USE_CACHED_KEY,4,2   ## @KCM_FLAGS_USE_CACHED_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kcm_ccache_acquire: KCM_FLAGS_USE_CACHED_KEY without key"

	.comm	_KCM_FLAGS_USE_KEYTAB,4,2       ## @KCM_FLAGS_USE_KEYTAB
L_.str.1:                               ## @.str.1
	.asciz	"kcm_ccache_acquire: KCM_FLAGS_USE_KEYTAB without keytab"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot acquire initial credentials for cache %s without key"

	.comm	_KRB5_FCC_INTERNAL,8,3          ## @KRB5_FCC_INTERNAL
L_.str.3:                               ## @.str.3
	.asciz	"Failed to unparse service principal name for cache %s: %s"

L_.str.4:                               ## @.str.4
	.asciz	"kcm"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to acquire credentials for cache %s: %s"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to store credentials for cache %s: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kcm_ccache_acquire             ; -- Begin function kcm_ccache_acquire
	.p2align	2
_kcm_ccache_acquire:                    ; @kcm_ccache_acquire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x2
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #32]
	str	xzr, [sp, #16]
	add	x0, sp, #44
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x21
	bl	_KCM_ASSERT_VALID
	ldr	w8, [x21]
Lloh0:
	adrp	x25, _KCM_FLAGS_USE_CACHED_KEY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _KCM_FLAGS_USE_CACHED_KEY@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x21, #40]
	cbnz	x8, LBB0_7
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh4:
	adrp	x9, _KCM_FLAGS_USE_KEYTAB@GOTPAGE
Lloh5:
	ldr	x9, [x9, _KCM_FLAGS_USE_KEYTAB@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.4:
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_7
; %bb.5:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_krb5_abortx
LBB0_7:
	add	x20, x21, #24
	mov	x0, x20
	bl	_HEIMDAL_MUTEX_lock
	add	x2, sp, #28
	mov	x0, x19
	mov	x1, x21
	bl	_kcm_internal_ccache
	ldr	x1, [x21, #56]
	cbz	x1, LBB0_10
; %bb.8:
	add	x2, sp, #16
	mov	x0, x19
	bl	_krb5_unparse_name
	cbz	x0, LBB0_10
; %bb.9:
	mov	x23, x0
	ldr	w20, [x21, #28]
	mov	x0, x19
	mov	x1, x23
	bl	_krb5_get_err_text
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #0
	mov	x2, x20
	bl	_kcm_log
	b	LBB0_23
LBB0_10:
	ldr	w1, [x21, #48]
	mov	x0, x19
	bl	_krb5_principal_get_realm
	mov	x24, x0
	add	x1, sp, #32
	mov	x0, x19
	bl	_krb5_get_init_creds_opt_alloc
	mov	x23, x0
	cbz	x0, LBB0_14
LBB0_11:
	ldr	x1, [sp, #32]
	cbz	x1, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_krb5_get_init_creds_opt_free
LBB0_13:
	mov	x0, x20
	bl	_HEIMDAL_MUTEX_unlock
	b	LBB0_23
LBB0_14:
	ldr	x3, [sp, #32]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_krb5_get_init_creds_opt_set_default_flags
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_16
; %bb.15:
	ldr	x0, [sp, #32]
	bl	_krb5_get_init_creds_opt_set_tkt_life
LBB0_16:
	ldr	x1, [x21, #16]
	cbz	x1, LBB0_18
; %bb.17:
	ldr	x0, [sp, #32]
	bl	_krb5_get_init_creds_opt_set_renew_life
LBB0_18:
	ldr	w8, [x21]
	ldr	w9, [x25]
	ldr	w2, [x21, #48]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.19:
	add	x3, x21, #40
	ldr	x5, [sp, #16]
	ldr	x6, [sp, #32]
	add	x1, sp, #44
	mov	x0, x19
	mov	w4, #0
	bl	_krb5_get_init_creds_keyblock
	mov	x23, x0
	cbz	x0, LBB0_25
LBB0_20:
	ldr	w21, [x21, #28]
	mov	x0, x19
	mov	x1, x23
	bl	_krb5_get_err_text
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #0
	mov	x2, x21
	bl	_kcm_log
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_11
; %bb.21:
	bl	_free
	b	LBB0_11
LBB0_22:
	ldr	w2, [x21, #28]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
	bl	_kcm_log
Lloh17:
	adrp	x8, _KRB5_FCC_INTERNAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KRB5_FCC_INTERNAL@GOTPAGEOFF]
Lloh19:
	ldr	x23, [x8]
LBB0_23:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	ldr	x3, [x21, #32]
	ldr	x5, [sp, #16]
	ldr	x6, [sp, #32]
	add	x1, sp, #44
	mov	x0, x19
	mov	w4, #0
	bl	_krb5_get_init_creds_keytab
	mov	x23, x0
	cbnz	x0, LBB0_20
LBB0_25:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_27
; %bb.26:
	bl	_free
LBB0_27:
	mov	x0, x19
	mov	x1, x21
	bl	_kcm_ccache_remove_creds_internal
	add	x2, sp, #44
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	mov	x4, x22
	bl	_kcm_ccache_store_cred_internal
	mov	x23, x0
	cbz	x0, LBB0_11
; %bb.28:
	ldr	w21, [x21, #28]
	mov	x0, x19
	mov	x1, x23
	bl	_krb5_get_err_text
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #0
	mov	x2, x21
	bl	_kcm_log
	add	x1, sp, #44
	mov	x0, x19
	bl	_krb5_free_cred_contents
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_KCM_FLAGS_USE_CACHED_KEY,4,2   ; @KCM_FLAGS_USE_CACHED_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kcm_ccache_acquire: KCM_FLAGS_USE_CACHED_KEY without key"

	.comm	_KCM_FLAGS_USE_KEYTAB,4,2       ; @KCM_FLAGS_USE_KEYTAB
l_.str.1:                               ; @.str.1
	.asciz	"kcm_ccache_acquire: KCM_FLAGS_USE_KEYTAB without keytab"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot acquire initial credentials for cache %s without key"

	.comm	_KRB5_FCC_INTERNAL,8,3          ; @KRB5_FCC_INTERNAL
l_.str.3:                               ; @.str.3
	.asciz	"Failed to unparse service principal name for cache %s: %s"

l_.str.4:                               ; @.str.4
	.asciz	"kcm"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to acquire credentials for cache %s: %s"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to store credentials for cache %s: %s"

.subsections_via_symbols
