	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_gen                        ## -- Begin function ctf_gen
	.p2align	4, 0x90
_ctf_gen:                               ## @ctf_gen
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_ctf_buf_new
	movq	%rax, %r13
	movq	_CTF_SWAP_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %eax
	andl	%ebx, %eax
	movq	_target_requires_swap@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	notl	%r14d
	movl	%r14d, %eax
	movq	_CTF_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -92(%rbp)
	movq	_CTF_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -96(%rbp)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	andl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	movq	_CTF_F_COMPRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movl	%eax, -100(%rbp)
	movq	32(%r12), %rax
	movl	8(%rax), %esi
	movq	%r13, %rdi
	callq	_strtab_insert
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, -112(%rbp)
	movq	32(%r12), %rax
	movl	4(%rax), %esi
	movq	%r13, %rdi
	callq	_strtab_insert
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -120(%rbp)
	movq	$0, -128(%rbp)
	movq	32(%r12), %rax
	movl	(%rax), %edi
	movq	_write_label@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_list_iter
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_pad_buffer
	movq	%r13, %rdi
	callq	_ctf_buf_cur
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -136(%rbp)
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r13, %rsi
	callq	_write_objects
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_pad_buffer
	movq	%r13, %rdi
	callq	_ctf_buf_cur
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -144(%rbp)
	cmpl	$0, 4(%r12)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r13, %rsi
	callq	_write_functions
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_pad_buffer
	movq	%r13, %rdi
	callq	_ctf_buf_cur
	movq	%rax, %r15
	movq	%rax, -152(%rbp)
	movl	8(%r12), %edi
	movq	_write_type@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_list_iter
	movl	8(%r12), %edi
	callq	_list_count
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	callq	_debug
	movq	%r13, %rdi
	callq	_ctf_buf_cur
	movq	%rax, %rbx
	movq	%rax, -160(%rbp)
	movq	%r13, %rdi
	callq	_strtab_size
	movq	%rax, %r12
	movq	%rax, -168(%rbp)
	movq	_target_requires_swap@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.9:
	callq	_SWAP_16
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_SWAP_32
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_SWAP_32
	xorl	%edi, %edi
	callq	_SWAP_32
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_SWAP_32
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_SWAP_32
	movq	%r15, %rdi
	callq	_SWAP_32
	movq	%rbx, %rdi
	callq	_SWAP_32
	movq	%r12, %rdi
	callq	_SWAP_32
LBB0_10:
	testl	%r14d, -44(%rbp)                ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	leaq	-168(%rbp), %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_write_compressed_buffer
	jmp	LBB0_13
LBB0_12:
	leaq	-168(%rbp), %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_write_buffer
LBB0_13:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_ctf_buf_free
	movl	%ebx, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTF_SWAP_BYTES,4,2             ## @CTF_SWAP_BYTES
	.comm	_target_requires_swap,4,2       ## @target_requires_swap
	.comm	_CTF_MAGIC,4,2                  ## @CTF_MAGIC
	.comm	_CTF_VERSION,4,2                ## @CTF_VERSION
	.comm	_CTF_F_COMPRESS,4,2             ## @CTF_F_COMPRESS
	.comm	_write_label,4,2                ## @write_label
	.comm	_write_type,4,2                 ## @write_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CTF wrote %d types\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_gen                        ; -- Begin function ctf_gen
	.p2align	2
_ctf_gen:                               ; @ctf_gen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x23, x0
	bl	_ctf_buf_new
	mov	x19, x0
Lloh0:
	adrp	x8, _CTF_SWAP_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTF_SWAP_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x20, _target_requires_swap@GOTPAGE
Lloh4:
	ldr	x20, [x20, _target_requires_swap@GOTPAGEOFF]
	and	w9, w8, w21
	str	w9, [x20]
	bics	w28, w21, w8
Lloh5:
	adrp	x8, _CTF_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTF_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #92]
Lloh8:
	adrp	x8, _CTF_VERSION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CTF_VERSION@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _CTF_F_COMPRESS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CTF_F_COMPRESS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	csel	w9, wzr, w9, eq
	stp	w9, w8, [sp, #84]
	ldr	x8, [x23, #32]
	ldr	w1, [x8, #8]
	bl	_strtab_insert
	mov	x21, x0
	str	x0, [sp, #72]
	ldr	x8, [x23, #32]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_strtab_insert
	mov	x22, x0
	stp	xzr, x0, [sp, #56]
	ldr	x8, [x23, #32]
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _write_label@GOTPAGE
Lloh15:
	ldr	x8, [x8, _write_label@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_list_iter
	mov	x0, x19
	mov	w1, #2
	bl	_pad_buffer
	mov	x0, x19
	bl	_ctf_buf_cur
	mov	x24, x0
	str	x0, [sp, #48]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #24]
	ldr	w0, [x8, x25, lsl #2]
	mov	x1, x19
	bl	_write_objects
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	mov	w1, #2
	bl	_pad_buffer
	mov	x0, x19
	bl	_ctf_buf_cur
	mov	x25, x0
	str	x0, [sp, #40]
	ldr	w8, [x23, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x26, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #16]
	ldr	w0, [x8, x26, lsl #2]
	mov	x1, x19
	bl	_write_functions
	add	x26, x26, #1
	ldrsw	x8, [x23, #4]
	cmp	x26, x8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	w1, #4
	bl	_pad_buffer
	mov	x0, x19
	bl	_ctf_buf_cur
	mov	x26, x0
	str	x0, [sp, #32]
	ldr	w0, [x23, #8]
Lloh17:
	adrp	x8, _write_type@GOTPAGE
Lloh18:
	ldr	x8, [x8, _write_type@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_list_iter
	ldr	w0, [x23, #8]
	bl	_list_count
	mov	x2, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_debug
	mov	x0, x19
	bl	_ctf_buf_cur
	mov	x23, x0
	str	x0, [sp, #24]
	mov	x0, x19
	bl	_strtab_size
	str	x0, [sp, #16]
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.7:
	mov	x27, x0
	bl	_SWAP_16
	mov	x0, x21
	bl	_SWAP_32
	mov	x0, x22
	bl	_SWAP_32
	mov	x0, #0
	bl	_SWAP_32
	mov	x0, x24
	bl	_SWAP_32
	mov	x0, x25
	bl	_SWAP_32
	mov	x0, x26
	bl	_SWAP_32
	mov	x0, x23
	bl	_SWAP_32
	mov	x0, x27
	bl	_SWAP_32
LBB0_8:
	add	x0, sp, #16
	mov	x1, x19
	cbz	w28, LBB0_10
; %bb.9:
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_write_compressed_buffer
	b	LBB0_11
LBB0_10:
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_write_buffer
LBB0_11:
	mov	x20, x0
	mov	x0, x19
	bl	_ctf_buf_free
	mov	x0, x20
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CTF_SWAP_BYTES,4,2             ; @CTF_SWAP_BYTES
	.comm	_target_requires_swap,4,2       ; @target_requires_swap
	.comm	_CTF_MAGIC,4,2                  ; @CTF_MAGIC
	.comm	_CTF_VERSION,4,2                ; @CTF_VERSION
	.comm	_CTF_F_COMPRESS,4,2             ; @CTF_F_COMPRESS
	.comm	_write_label,4,2                ; @write_label
	.comm	_write_type,4,2                 ; @write_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CTF wrote %d types\n"

.subsections_via_symbols
