	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function recv_bsd_auth
_recv_bsd_auth:                         ## @recv_bsd_auth
	.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	%r9, %r14
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	%edi, %r13d
	movq	_USERNAME_SZ@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_read_str
	movq	%rax, (%r15)
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdx
	movl	%r13d, %edi
	callq	_read_str
	movq	%rax, (%r14)
	movq	_ARG_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	leaq	L_.str.2(%rip), %rdx
	movl	%r13d, %edi
	callq	_read_str
	movq	16(%rbp), %rcx
	movq	%rax, (%rcx)
	movq	(%r14), %rdi
	callq	_getpwnam
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.3(%rip), %rdx
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_fatal
LBB0_2:
	xorl	%esi, %esi
	cmpq	$0, (%rbx)
	movl	(%r12), %edi
	sete	%sil
	movq	(%r15), %rdx
	movq	(%r14), %rcx
	callq	_iruserok
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdx
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_fatal
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USERNAME_SZ,8,3                ## @USERNAME_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"local username"

L_.str.1:                               ## @.str.1
	.asciz	"remote username"

	.comm	_ARG_MAX,8,3                    ## @ARG_MAX
L_.str.2:                               ## @.str.2
	.asciz	"command"

L_.str.3:                               ## @.str.3
	.asciz	"Login incorrect."

	.no_dead_strip	_recv_bsd_auth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function recv_bsd_auth
_recv_bsd_auth:                         ; @recv_bsd_auth
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x19, x0
Lloh0:
	adrp	x24, _USERNAME_SZ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _USERNAME_SZ@GOTPAGEOFF]
	ldr	x1, [x24]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_read_str
	str	x0, [x21]
	ldr	x1, [x24]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_read_str
	str	x0, [x20]
Lloh6:
	adrp	x8, _ARG_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ARG_MAX@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, #1
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_read_str
	str	x0, [x23]
	ldr	x0, [x20]
	bl	_getpwnam
	mov	x23, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh11:
	adrp	x2, l_.str.3@PAGE
Lloh12:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	bl	_fatal
LBB0_2:
	ldr	w0, [x22]
	ldr	x8, [x23]
	cmp	x8, #0
	cset	w1, eq
	ldr	x2, [x21]
	ldr	x3, [x20]
	bl	_iruserok
	cbz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, #0
	bl	_fatal
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_USERNAME_SZ,8,3                ; @USERNAME_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"local username"

l_.str.1:                               ; @.str.1
	.asciz	"remote username"

	.comm	_ARG_MAX,8,3                    ; @ARG_MAX
l_.str.2:                               ; @.str.2
	.asciz	"command"

l_.str.3:                               ; @.str.3
	.asciz	"Login incorrect."

	.no_dead_strip	_recv_bsd_auth
.subsections_via_symbols
