	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kernel_from_dumpnr
_kernel_from_dumpnr:                    ## @kernel_from_dumpnr
	.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
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_crashdir@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_21
## %bb.7:
	movq	%rax, %r15
	leaq	L_.str.5(%rip), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	decl	%eax
	cmpb	$10, (%rbx,%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movb	$0, (%rbx,%rax)
	jmp	LBB0_12
LBB0_1:
	movl	-56(%rbp), %r12d
	movl	%r12d, %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_strdup
	movq	_kernel@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_19
LBB0_21:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warn
	jmp	LBB0_19
LBB0_13:
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_strchr
	movq	%rbx, %rdx
	addq	$4, %rdx
	leaq	1(%rax), %rcx
	testq	%rax, %rax
	cmoveq	%rdx, %rcx
	leaq	L_.str.6(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_snprintf
	movl	%eax, %r14d
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.14:
	movl	-56(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	jne	LBB0_17
LBB0_15:
	movslq	%r14d, %rax
	movb	$0, -6(%rax,%rbx)
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_18
## %bb.16:
	movl	-56(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_18
LBB0_17:
	movq	%rbx, %rdi
	callq	_strdup
	movq	_kernel@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_18:
	movq	%r15, %rdi
	callq	_fclose
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r12d, %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%r13), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	-56(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	jne	LBB0_2
	jmp	LBB0_6
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/kernel.%d"

	.comm	_crashdir,8,3                   ## @crashdir
	.comm	_kernel,4,2                     ## @kernel
L_.str.1:                               ## @.str.1
	.asciz	"%s/kernel.%d/kernel"

L_.str.2:                               ## @.str.2
	.asciz	"%s/info.%d"

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

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

L_.str.5:                               ## @.str.5
	.asciz	"    "

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

	.no_dead_strip	_kernel_from_dumpnr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kernel_from_dumpnr
_kernel_from_dumpnr:                    ; @kernel_from_dumpnr
	.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
	sub	sp, sp, #16
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x23, _crashdir@GOTPAGE
Lloh9:
	ldr	x23, [x23, _crashdir@GOTPAGEOFF]
	ldr	x3, [x23]
	mov	x8, x0
	str	x8, [sp, #-16]!
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_snprintf
	add	sp, sp, #16
	sub	x1, x29, #64
	mov	x0, x19
	bl	_stat
	cbz	w0, LBB0_8
LBB0_1:
	ldr	x3, [x23]
	str	x21, [sp, #-16]!
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_snprintf
	add	sp, sp, #16
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_10
; %bb.2:
	mov	x21, x0
Lloh16:
	adrp	x22, l_.str.5@PAGE
Lloh17:
	add	x22, x22, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	w2, #4
	bl	_strncmp
	cbz	x0, LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_fgets
	cbz	x0, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_strlen
	subs	w8, w0, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w9, [x19, x8]
	cmp	w9, #10
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	wzr, [x19, x8]
	b	LBB0_3
LBB0_8:
	ldur	w22, [x29, #-64]
	mov	x0, x22
	bl	_S_ISREG
	cbz	x0, LBB0_19
LBB0_9:
	mov	x0, x19
	bl	_strdup
Lloh18:
	adrp	x8, _kernel@GOTPAGE
Lloh19:
	ldr	x8, [x8, _kernel@GOTPAGEOFF]
Lloh20:
	str	w0, [x8]
	b	LBB0_17
LBB0_10:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_warn
	b	LBB0_17
LBB0_11:
	mov	x0, x19
	mov	w1, #58
	bl	_strchr
	add	x8, x19, #4
	cmp	x0, #0
	csinc	x3, x8, x0, eq
Lloh23:
	adrp	x2, l_.str.6@PAGE
Lloh24:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_snprintf
	mov	x20, x0
	sub	x1, x29, #64
	mov	x0, x19
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.12:
	ldur	w0, [x29, #-64]
	bl	_S_ISREG
	cbnz	x0, LBB0_15
LBB0_13:
	add	x8, x19, w20, sxtw
	sturb	wzr, [x8, #-6]
	sub	x1, x29, #64
	mov	x0, x19
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.14:
	ldur	w0, [x29, #-64]
	bl	_S_ISREG
	cbz	x0, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_strdup
Lloh25:
	adrp	x8, _kernel@GOTPAGE
Lloh26:
	ldr	x8, [x8, _kernel@GOTPAGEOFF]
Lloh27:
	str	w0, [x8]
LBB0_16:
	mov	x0, x21
	bl	_fclose
LBB0_17:
	ldur	x8, [x29, #-56]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.18:
	sub	sp, x29, #48
	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
LBB0_19:
	mov	x0, x22
	bl	_S_ISDIR
	cbz	x0, LBB0_1
; %bb.20:
	ldr	x3, [x23]
	mov	x8, x21
	str	x8, [sp, #-16]!
Lloh31:
	adrp	x2, l_.str.1@PAGE
Lloh32:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_snprintf
	add	sp, sp, #16
	sub	x1, x29, #64
	mov	x0, x19
	bl	_stat
	cbnz	w0, LBB0_1
; %bb.21:
	ldur	w0, [x29, #-64]
	bl	_S_ISREG
	cbnz	x0, LBB0_9
	b	LBB0_1
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/kernel.%d"

	.comm	_crashdir,8,3                   ; @crashdir
	.comm	_kernel,4,2                     ; @kernel
l_.str.1:                               ; @.str.1
	.asciz	"%s/kernel.%d/kernel"

l_.str.2:                               ; @.str.2
	.asciz	"%s/info.%d"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"    "

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

	.no_dead_strip	_kernel_from_dumpnr
.subsections_via_symbols
