	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_load                       ## -- Begin function ctf_load
	.p2align	4, 0x90
_ctf_load:                              ## @ctf_load
	.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	%r8, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	_curfile@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	cmpq	$39, %rdx
	ja	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_parseterminate
LBB0_2:
	movslq	%ebx, %rbx
	movq	(%rbx), %rsi
	movq	_CTF_MAGIC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_parseterminate
LBB0_4:
	movq	8(%rbx), %rsi
	movq	_CTF_VERSION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_parseterminate
LBB0_6:
	leal	40(%rbx), %r15d
	movq	_CTF_F_COMPRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 32(%rbx)
	je	LBB0_7
## %bb.8:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addq	$-40, %r12
	movq	24(%rbx), %r14
	addq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_xmalloc
	movl	%eax, %r13d
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	movq	%r14, %rcx
	callq	_decompress_ctf
	cmpq	%r14, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_parseterminate
LBB0_10:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_7:
	movl	%r15d, %r13d
LBB0_11:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_ctf_parse
	movq	%rax, %r14
	movq	_CTF_F_COMPRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 32(%rbx)
	je	LBB0_13
## %bb.12:
	movl	%r13d, %edi
	callq	_free
LBB0_13:
	movq	_curfile@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_curfile,8,3                    ## @curfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Corrupt CTF - short header"

	.comm	_CTF_MAGIC,8,3                  ## @CTF_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"Corrupt CTF - bad magic 0x%x"

	.comm	_CTF_VERSION,8,3                ## @CTF_VERSION
L_.str.2:                               ## @.str.2
	.asciz	"Unknown CTF version %d"

	.comm	_CTF_F_COMPRESS,4,2             ## @CTF_F_COMPRESS
L_.str.3:                               ## @.str.3
	.asciz	"Corrupt CTF - short decompression (was %d, expecting %d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_load                       ; -- Begin function ctf_load
	.p2align	2
_ctf_load:                              ; @ctf_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
Lloh0:
	adrp	x26, _curfile@GOTPAGE
Lloh1:
	ldr	x26, [x26, _curfile@GOTPAGEOFF]
	str	x0, [x26]
	cmp	x2, #39
	b.hi	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_parseterminate
LBB0_2:
	sxtw	x21, w23
	ldr	x8, [x21]
Lloh4:
	adrp	x9, _CTF_MAGIC@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CTF_MAGIC@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_parseterminate
LBB0_4:
	add	w23, w23, #40
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _CTF_VERSION@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CTF_VERSION@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_parseterminate
LBB0_6:
	ldr	w8, [x21, #32]
Lloh14:
	adrp	x27, _CTF_F_COMPRESS@GOTPAGE
Lloh15:
	ldr	x27, [x27, _CTF_F_COMPRESS@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	sub	x25, x22, #40
	ldp	x8, x9, [x21, #16]
	add	x24, x9, x8
	mov	x0, x24
	bl	_xmalloc
	mov	x22, x0
	mov	x0, x23
	mov	x1, x25
	mov	x2, x22
	mov	x3, x24
	bl	_decompress_ctf
	cmp	x0, x24
	b.eq	LBB0_10
; %bb.8:
	stp	x0, x24, [sp]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_parseterminate
	b	LBB0_10
LBB0_9:
	mov	x22, x23
LBB0_10:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	bl	_ctf_parse
	mov	x19, x0
	ldr	w8, [x21, #32]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x22
	bl	_free
LBB0_12:
	str	xzr, [x26]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_curfile,8,3                    ; @curfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Corrupt CTF - short header"

	.comm	_CTF_MAGIC,8,3                  ; @CTF_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"Corrupt CTF - bad magic 0x%x"

	.comm	_CTF_VERSION,8,3                ; @CTF_VERSION
l_.str.2:                               ; @.str.2
	.asciz	"Unknown CTF version %d"

	.comm	_CTF_F_COMPRESS,4,2             ; @CTF_F_COMPRESS
l_.str.3:                               ; @.str.3
	.asciz	"Corrupt CTF - short decompression (was %d, expecting %d)"

.subsections_via_symbols
