	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_su_principal
_get_su_principal:                      ## @get_su_principal
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	$0, (%r8)
	movq	$0, -56(%rbp)
	xorl	%eax, %eax
	callq	_getuid
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_geteuid
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_seteuid
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_24:
	movq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r13                ## 8-byte Reload
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_strdup
	movq	%rax, -80(%rbp)
	jmp	LBB0_5
LBB0_4:
	movq	_KRB5_DEFAULT_CCROOT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	leaq	-80(%rbp), %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_asprintf
	movq	-80(%rbp), %rax
LBB0_5:
	movq	%r14, %r12
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	leaq	-68(%rbp), %rdx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_krb5_cc_resolve
	movq	%rax, %rbx
	movq	-80(%rbp), %rdi
	callq	_free
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.7:
	movl	-68(%rbp), %esi
	leaq	-56(%rbp), %rdx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_krb5_cc_get_principal
	movq	%rax, %r12
	movl	-68(%rbp), %esi
	movl	%ebx, %edi
	callq	_krb5_cc_close
	testq	%r12, %r12
	movq	%r14, %r12
	je	LBB0_9
## %bb.8:
	movq	$0, -56(%rbp)
LBB0_9:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_seteuid
	testq	%rax, %rax
	jne	LBB0_1
## %bb.10:
	movq	-56(%rbp), %rsi
	testq	%rsi, %rsi
	movq	%r15, %r14
	je	LBB0_11
LBB0_13:
	leaq	-64(%rbp), %rdx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_krb5_unparse_name
	movq	%rax, %rbx
	movq	-56(%rbp), %rsi
	movl	%r15d, %edi
	callq	_krb5_free_principal
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.14:
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_krb5_get_error_message
	movq	%rax, %r14
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_PAM_LOG
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_krb5_free_error_message
	jmp	LBB0_24
LBB0_11:
	leaq	-56(%rbp), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%edx, %edx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	_krb5_make_principal
	testq	%rax, %rax
	je	LBB0_12
## %bb.25:
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_PAM_LOG
	jmp	LBB0_24
LBB0_15:
	movq	-64(%rbp), %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_PAM_LOG
	movq	_superuser@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_strcmp
	movq	-64(%rbp), %r12
	testq	%rax, %rax
	je	LBB0_16
## %bb.19:
	movq	%r12, (%r13)
	jmp	LBB0_20
LBB0_12:
	movq	-56(%rbp), %rsi
	jmp	LBB0_13
LBB0_16:
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %r8
	incq	%r8
	movb	$0, (%rax)
	movq	$0, (%r13)
	movq	-64(%rbp), %rdx
	movslq	(%rbx), %rcx
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_asprintf
	movq	-64(%rbp), %rdi
	callq	_free
	movq	(%r13), %r12
LBB0_20:
	testq	%r12, %r12
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_1
## %bb.21:
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_krb5_parse_name
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%rax, %rbx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_krb5_get_error_message
	movq	%rax, %r14
	movq	(%r13), %rsi
	leaq	L_.str.7(%rip), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_PAM_LOG
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_krb5_free_error_message
	movq	(%r13), %rdi
	callq	_free
	jmp	LBB0_24
LBB0_23:
	movq	(%r13), %rsi
	leaq	L_.str.8(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PAM_LOG
	movq	-56(%rbp), %rax
	movq	%rax, (%r14)
	jmp	LBB0_24
LBB0_17:
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_PAM_LOG
	movq	-64(%rbp), %rdi
	callq	_free
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KRB5CCNAME"

L_.str.1:                               ## @.str.1
	.asciz	"%s%lu"

	.comm	_KRB5_DEFAULT_CCROOT,4,2        ## @KRB5_DEFAULT_CCROOT
L_.str.2:                               ## @.str.2
	.asciz	"Could not determine default principal name."

L_.str.3:                               ## @.str.3
	.asciz	"krb5_unparse_name: %s"

L_.str.4:                               ## @.str.4
	.asciz	"Default principal name: %s"

	.comm	_superuser,4,2                  ## @superuser
L_.str.5:                               ## @.str.5
	.asciz	"malformed principal name `%s'"

L_.str.6:                               ## @.str.6
	.asciz	"%s/%s@%s"

L_.str.7:                               ## @.str.7
	.asciz	"krb5_parse_name `%s': %s"

L_.str.8:                               ## @.str.8
	.asciz	"Target principal name: %s"

	.no_dead_strip	_get_su_principal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_su_principal
_get_su_principal:                      ; @get_su_principal
	.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	x21, x4
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	str	xzr, [x4]
	str	xzr, [sp, #40]
	bl	_getuid
	mov	x25, x0
	bl	_geteuid
	mov	x24, x0
	mov	x0, x25
	bl	_seteuid
	cbz	x0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
LBB0_2:
	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_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_5
; %bb.4:
	bl	_strdup
	mov	x1, x0
	str	x0, [sp, #16]
	cbnz	x1, LBB0_6
	b	LBB0_1
LBB0_5:
Lloh5:
	adrp	x8, _KRB5_DEFAULT_CCROOT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KRB5_DEFAULT_CCROOT@GOTPAGEOFF]
Lloh7:
	ldrsw	x2, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #16
	mov	x3, x25
	bl	_asprintf
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_1
LBB0_6:
	add	x2, sp, #36
	mov	x0, x19
	bl	_krb5_cc_resolve
	mov	x25, x0
	ldr	x0, [sp, #16]
	bl	_free
	cbnz	x25, LBB0_9
; %bb.7:
	ldr	w1, [sp, #36]
	add	x2, sp, #40
	mov	x0, x19
	bl	_krb5_cc_get_principal
	mov	x25, x0
	ldr	w1, [sp, #36]
	mov	x0, x19
	bl	_krb5_cc_close
	cbz	x25, LBB0_9
; %bb.8:
	str	xzr, [sp, #40]
LBB0_9:
	mov	x0, x24
	bl	_seteuid
	cbnz	x0, LBB0_1
; %bb.10:
	ldr	x1, [sp, #40]
	cbz	x1, LBB0_13
LBB0_11:
	add	x2, sp, #24
	mov	x0, x19
	bl	_krb5_unparse_name
	mov	x23, x0
	ldr	x1, [sp, #40]
	mov	x0, x19
	bl	_krb5_free_principal
	cbz	x23, LBB0_15
; %bb.12:
	mov	x0, x19
	mov	x1, x23
	bl	_krb5_get_error_message
	mov	x20, x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_PAM_LOG
	mov	x0, x19
	mov	x1, x20
	bl	_krb5_free_error_message
	b	LBB0_2
LBB0_13:
	add	x1, sp, #40
	mov	x0, x19
	mov	x2, #0
	mov	x3, x23
	mov	x4, #0
	bl	_krb5_make_principal
	cbz	x0, LBB0_17
; %bb.14:
	mov	x23, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_PAM_LOG
	b	LBB0_2
LBB0_15:
	ldr	x8, [sp, #24]
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_PAM_LOG
Lloh16:
	adrp	x23, _superuser@GOTPAGE
Lloh17:
	ldr	x23, [x23, _superuser@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_strcmp
	ldr	x22, [sp, #24]
	cbz	x0, LBB0_18
; %bb.16:
	str	x22, [x20]
	b	LBB0_20
LBB0_17:
	ldr	x1, [sp, #40]
	b	LBB0_11
LBB0_18:
	mov	x0, x22
	mov	w1, #64
	bl	_strrchr
	cbz	x0, LBB0_24
; %bb.19:
	strb	wzr, [x0], #1
	str	xzr, [x20]
	ldr	x2, [sp, #24]
	ldrsw	x3, [x23]
	str	x0, [sp]
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_asprintf
	ldr	x0, [sp, #24]
	bl	_free
	ldr	x22, [x20]
LBB0_20:
	cbz	x22, LBB0_1
; %bb.21:
	add	x2, sp, #40
	mov	x0, x19
	mov	x1, x22
	bl	_krb5_parse_name
	mov	x23, x0
	cbz	x0, LBB0_23
; %bb.22:
	mov	x0, x19
	mov	x1, x23
	bl	_krb5_get_error_message
	mov	x21, x0
	ldr	x8, [x20]
	stp	x8, x0, [sp]
Lloh20:
	adrp	x0, l_.str.7@PAGE
Lloh21:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_PAM_LOG
	mov	x0, x19
	mov	x1, x21
	bl	_krb5_free_error_message
	ldr	x0, [x20]
	bl	_free
	b	LBB0_2
LBB0_23:
	ldr	x8, [x20]
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.8@PAGE
Lloh23:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_PAM_LOG
	ldr	x8, [sp, #40]
	str	x8, [x21]
	b	LBB0_2
LBB0_24:
	str	x22, [sp]
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_PAM_LOG
	ldr	x0, [sp, #24]
	bl	_free
	mov	x23, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KRB5CCNAME"

l_.str.1:                               ; @.str.1
	.asciz	"%s%lu"

	.comm	_KRB5_DEFAULT_CCROOT,4,2        ; @KRB5_DEFAULT_CCROOT
l_.str.2:                               ; @.str.2
	.asciz	"Could not determine default principal name."

l_.str.3:                               ; @.str.3
	.asciz	"krb5_unparse_name: %s"

l_.str.4:                               ; @.str.4
	.asciz	"Default principal name: %s"

	.comm	_superuser,4,2                  ; @superuser
l_.str.5:                               ; @.str.5
	.asciz	"malformed principal name `%s'"

l_.str.6:                               ; @.str.6
	.asciz	"%s/%s@%s"

l_.str.7:                               ; @.str.7
	.asciz	"krb5_parse_name `%s': %s"

l_.str.8:                               ; @.str.8
	.asciz	"Target principal name: %s"

	.no_dead_strip	_get_su_principal
.subsections_via_symbols
