	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loginshell
_loginshell:                            ## @loginshell
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_pwd@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %r12
	movq	8(%rax), %rdi
	cmpb	$0, (%r12)
	jne	LBB0_2
## %bb.1:
	movq	__PATH_BSHELL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_2:
	callq	_chdir
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movq	(%r13), %rax
	movq	8(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_warn
	leaq	L_.str.1(%rip), %rdi
	callq	_chdir
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	movq	%rax, %r15
	leaq	L_.str.3(%rip), %rdi
	callq	_getenv
	movq	%rax, %r14
	movl	$20, %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_6:
	movq	$0, (%rbx)
	movq	_environ@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	(%r13), %rdi
	callq	_login_getpwclass
	movq	%rax, %rbx
	movq	(%r13), %rsi
	movq	_LOGIN_SETPATH@GOTPCREL(%rip), %rax
	movq	_LOGIN_SETUMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	24(%rsi), %edx
	movq	_LOGIN_SETENV@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_setusercontext
	movq	%rbx, %rdi
	callq	_login_close
	movq	(%r13), %rax
	movq	16(%rax), %rsi
	leaq	L_.str.5(%rip), %rdi
	movl	$1, %edx
	callq	_setenv
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_setenv
	movq	(%r13), %rax
	movq	8(%rax), %rsi
	leaq	L_.str.7(%rip), %rdi
	movl	$1, %edx
	callq	_setenv
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_setenv
LBB0_8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_setenv
LBB0_10:
	leaq	L_.str.8(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movq	%r12, %rdx
	callq	_asprintf
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_12:
	movq	$0, -56(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_execv
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_err
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_pwd,8,3                        ## @pwd
	.comm	__PATH_BSHELL,8,3               ## @_PATH_BSHELL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"/"

L_.str.2:                               ## @.str.2
	.asciz	"TERM"

L_.str.3:                               ## @.str.3
	.asciz	"KRBTKFILE"

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

	.comm	_environ,8,3                    ## @environ
	.comm	_LOGIN_SETPATH,4,2              ## @LOGIN_SETPATH
	.comm	_LOGIN_SETUMASK,4,2             ## @LOGIN_SETUMASK
	.comm	_LOGIN_SETENV,4,2               ## @LOGIN_SETENV
L_.str.5:                               ## @.str.5
	.asciz	"USER"

L_.str.6:                               ## @.str.6
	.asciz	"SHELL"

L_.str.7:                               ## @.str.7
	.asciz	"HOME"

L_.str.8:                               ## @.str.8
	.asciz	"-%s"

L_.str.9:                               ## @.str.9
	.asciz	"asprintf"

	.no_dead_strip	_loginshell
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loginshell
_loginshell:                            ; @loginshell
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x23, _pwd@GOTPAGE
Lloh4:
	ldr	x23, [x23, _pwd@GOTPAGEOFF]
	ldr	x8, [x23]
	ldp	x9, x0, [x8]
	ldrb	w8, [x9]
Lloh5:
	adrp	x10, __PATH_BSHELL@GOTPAGE
Lloh6:
	ldr	x10, [x10, __PATH_BSHELL@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x19, x10, x9, eq
	bl	_chdir
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	x8, [x23]
	ldr	x1, [x8, #8]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_chdir
LBB0_2:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	mov	x21, x0
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_getenv
	mov	x20, x0
	mov	w0, #20
	mov	w1, #8
	bl	_calloc
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	str	xzr, [x22]
Lloh18:
	adrp	x8, _environ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _environ@GOTPAGEOFF]
Lloh20:
	str	x22, [x8]
	ldr	x0, [x23]
	bl	_login_getpwclass
	mov	x22, x0
	ldr	x1, [x23]
	ldr	w2, [x1, #24]
Lloh21:
	adrp	x8, _LOGIN_SETPATH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LOGIN_SETPATH@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _LOGIN_SETUMASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LOGIN_SETUMASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _LOGIN_SETENV@GOTPAGE
Lloh28:
	ldr	x9, [x9, _LOGIN_SETENV@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w3, w8, w9
	bl	_setusercontext
	mov	x0, x22
	bl	_login_close
	ldr	x8, [x23]
	ldr	x1, [x8, #16]
Lloh30:
	adrp	x0, l_.str.5@PAGE
Lloh31:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	w2, #1
	bl	_setenv
Lloh32:
	adrp	x0, l_.str.6@PAGE
Lloh33:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x19
	mov	w2, #1
	bl	_setenv
	ldr	x8, [x23]
	ldr	x1, [x8, #8]
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	w2, #1
	bl	_setenv
	cbz	x21, LBB0_6
; %bb.5:
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	w2, #1
	bl	_setenv
LBB0_6:
	cbz	x20, LBB0_8
; %bb.7:
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	w2, #1
	bl	_setenv
LBB0_8:
Lloh40:
	adrp	x1, l_.str.8@PAGE
Lloh41:
	add	x1, x1, l_.str.8@PAGEOFF
	add	x0, sp, #8
	mov	x2, x19
	bl	_asprintf
	tbz	x0, #63, LBB0_10
; %bb.9:
Lloh42:
	adrp	x1, l_.str.9@PAGE
Lloh43:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	str	xzr, [sp, #16]
	add	x1, sp, #8
	mov	x0, x19
	bl	_execv
	str	x19, [sp]
Lloh44:
	adrp	x1, l_.str@PAGE
Lloh45:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x8, [sp, #24]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_pwd,8,3                        ; @pwd
	.comm	__PATH_BSHELL,8,3               ; @_PATH_BSHELL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"/"

l_.str.2:                               ; @.str.2
	.asciz	"TERM"

l_.str.3:                               ; @.str.3
	.asciz	"KRBTKFILE"

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

	.comm	_environ,8,3                    ; @environ
	.comm	_LOGIN_SETPATH,4,2              ; @LOGIN_SETPATH
	.comm	_LOGIN_SETUMASK,4,2             ; @LOGIN_SETUMASK
	.comm	_LOGIN_SETENV,4,2               ; @LOGIN_SETENV
l_.str.5:                               ; @.str.5
	.asciz	"USER"

l_.str.6:                               ; @.str.6
	.asciz	"SHELL"

l_.str.7:                               ; @.str.7
	.asciz	"HOME"

l_.str.8:                               ; @.str.8
	.asciz	"-%s"

l_.str.9:                               ; @.str.9
	.asciz	"asprintf"

	.no_dead_strip	_loginshell
.subsections_via_symbols
