	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function auth_openfile
_auth_openfile:                         ## @auth_openfile
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -1080(%rbp)                ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.5:
	movl	%eax, %ebx
	leaq	-1088(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movl	-1088(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%ebx, %edi
	callq	_unset_nonblock
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	movq	%rax, %r13
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.11:
	movq	%r13, %rdi
	callq	_fileno
	leaq	-1072(%rbp), %rcx
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$1024, %r8d                     ## imm = 0x400
	callq	_safe_path_fd
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	callq	_fclose
	leaq	L_.str.3(%rip), %rdi
	xorl	%r13d, %r13d
	leaq	-1072(%rbp), %rbx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_logit
	leaq	L_.str.4(%rip), %rdi
	movq	-1080(%rbp), %rsi               ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_auth_debug_add
	jmp	LBB0_13
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testl	%r13d, %r13d
	jne	LBB0_4
## %bb.2:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.3:
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_6:
	movl	%ebx, %edi
	callq	_close
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_4:
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movq	-1080(%rbp), %rsi               ## 8-byte Reload
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_debug
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_8:
	movslq	(%r12), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r13d, %r13d
	movq	-1080(%rbp), %rdx               ## 8-byte Reload
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_logit
	movl	%ebx, %edi
	callq	_close
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movq	%r13, %rax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open %s '%s': %s"

L_.str.1:                               ## @.str.1
	.asciz	"User %s %s %s is not a regular file"

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

L_.str.3:                               ## @.str.3
	.asciz	"Authentication refused: %s"

L_.str.4:                               ## @.str.4
	.asciz	"Ignored %s: %s"

	.no_dead_strip	_auth_openfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function auth_openfile
_auth_openfile:                         ; @auth_openfile
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1056
	mov	x19, x4
	mov	x24, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
	stur	x8, [x29, #-72]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
	mov	x23, x0
	add	x1, sp, #16
	bl	_fstat
	tbnz	x0, #63, LBB0_11
; %bb.2:
	ldr	w0, [sp, #16]
	bl	_S_ISREG
	cbz	w0, LBB0_10
; %bb.3:
	mov	x0, x23
	bl	_unset_nonblock
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_fdopen
	mov	x24, x0
	cbz	x0, LBB0_15
; %bb.4:
	cbz	w22, LBB0_13
; %bb.5:
	mov	x0, x24
	bl	_fileno
	add	x3, sp, #24
	mov	x1, x20
	mov	x2, x21
	mov	w4, #1024
	bl	_safe_path_fd
	cbz	x0, LBB0_13
; %bb.6:
	mov	x0, x24
	bl	_fclose
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #24
	bl	_logit
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	add	x2, sp, #24
	mov	x1, x19
	bl	_auth_debug_add
	b	LBB0_12
LBB0_7:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
	cbnz	w24, LBB0_9
; %bb.8:
Lloh18:
	adrp	x8, _ENOENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_12
LBB0_9:
	bl	_strerror
	mov	x3, x0
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_debug
	b	LBB0_12
LBB0_10:
	ldrsw	x1, [x21]
	stp	x19, x20, [sp]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_logit
LBB0_11:
	mov	x0, x23
	bl	_close
LBB0_12:
	mov	x24, #0
LBB0_13:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x24
	add	sp, sp, #1056
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x23
	bl	_close
	b	LBB0_13
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open %s '%s': %s"

l_.str.1:                               ; @.str.1
	.asciz	"User %s %s %s is not a regular file"

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

l_.str.3:                               ; @.str.3
	.asciz	"Authentication refused: %s"

l_.str.4:                               ; @.str.4
	.asciz	"Ignored %s: %s"

	.no_dead_strip	_auth_openfile
.subsections_via_symbols
