	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_file
_write_file:                            ## @write_file
	.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	$232, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -192(%rbp)                 ## 8-byte Spill
	movq	%r8, -216(%rbp)                 ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	_CTF_USE_DYNSYM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_CTF_KEEP_STABS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_gelf_getclass
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_gelf_newehdr
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_2:
	leaq	-184(%rbp), %r15
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_gelf_getehdr
	leaq	-264(%rbp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_gelf_update_ehdr
	testl	%r13d, 16(%rbp)
	movl	%r13d, -120(%rbp)               ## 4-byte Spill
	jne	LBB0_3
## %bb.4:
	movq	_SHT_SYMTAB@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_SHT_DYNSYM@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, -224(%rbp)                ## 8-byte Spill
	cmpl	$0, -184(%rbp)
	movq	-152(%rbp), %r13                ## 8-byte Reload
	je	LBB0_11
## %bb.6:
	movq	_ELF_C_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ELF_F_LAYOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_elf_flagelf
	movl	-184(%rbp), %esi
	movq	%r12, %rdi
	callq	_gelf_newphdr
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	cmpl	$0, -184(%rbp)
	jg	LBB0_9
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
	cmpl	$0, -184(%rbp)
	jle	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
	leaq	-112(%rbp), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_gelf_getphdr
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_gelf_update_phdr
	incl	%ebx
	cmpl	-184(%rbp), %ebx
	jl	LBB0_10
LBB0_11:
	movb	-180(%rbp), %al
	shlb	$2, %al
	movsbl	%al, %edi
	callq	_xmalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, -180(%rbp)
	jle	LBB0_12
## %bb.15:
	movq	%r12, -208(%rbp)                ## 8-byte Spill
	leaq	-112(%rbp), %r14
	movq	_CTF_ELF_SCN_NAME@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$-1, (%rax,%r13,4)
LBB0_28:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r13
	movslq	-180(%rbp), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_elf_getscn
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_gelf_getshdr
	movl	-176(%rbp), %esi
	movq	-112(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_elf_strptr
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-112(%rbp), %rdx
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, 16(%rbp)
	je	LBB0_21
LBB0_25:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	-120(%rbp), %eax                ## 4-byte Reload
	testl	%eax, 16(%rbp)
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-104(%rbp), %rax
	movq	_SHT_SYMTAB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
LBB0_27:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax,%r13,4)
	incl	%r12d
	movq	%rbx, %rdi
	callq	_strlen
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	$5, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	$6, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.23:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	$10, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.6(%rip), %rsi
	movl	$11, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_25
	jmp	LBB0_19
LBB0_13:
	movq	-240(%rbp), %r13
	cmpl	$2, %eax
	movq	-208(%rbp), %r12                ## 8-byte Reload
	jl	LBB0_14
## %bb.29:
	movl	$-1, -116(%rbp)                 ## 4-byte Folded Spill
	movl	$1, %r14d
	leaq	-112(%rbp), %r15
	xorl	%eax, %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_67:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-104(%rbp), %rax
	movq	_SHT_NOBITS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movsbq	-72(%rbp), %rax
	movl	$0, %r13d
	cmovneq	%rax, %r13
	addq	-88(%rbp), %r13
	movq	-208(%rbp), %r12                ## 8-byte Reload
LBB0_68:                                ##   in Loop: Header=BB0_30 Depth=1
	incq	%r14
	movslq	-180(%rbp), %rax
	cmpq	%rax, %r14
	jge	LBB0_69
LBB0_30:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_55 Depth 2
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	movl	%r14d, %esi
	callq	_elf_getscn
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_gelf_getshdr
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$-1, (%rax,%r14,4)
	je	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r12, %rdi
	callq	_elf_newscn
	movq	%rax, %r12
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_38
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$0, -184(%rbp)
	je	LBB0_38
## %bb.34:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-96(%rbp), %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_35
## %bb.36:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_37
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_68
LBB0_35:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_37:                                ##   in Loop: Header=BB0_30 Depth=1
	movslq	%edx, %rax
	subq	%rax, %rcx
	testl	%eax, %eax
	movl	$0, %eax
	cmovneq	%rcx, %rax
	addq	%r13, %rax
	movq	%rax, -88(%rbp)
LBB0_38:                                ##   in Loop: Header=BB0_30 Depth=1
	movslq	-80(%rbp), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -80(%rbp)
	movq	-104(%rbp), %rax
	movq	_SHT_REL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	_SHT_RELA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_41
LBB0_40:                                ##   in Loop: Header=BB0_30 Depth=1
	movslq	-76(%rbp), %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -76(%rbp)
LBB0_41:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	-176(%rbp), %esi
	movq	-112(%rbp), %rdx
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	callq	_elf_strptr
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-112(%rbp), %rdx
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_43:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_gelf_update_shdr
	testq	%rax, %rax
	jne	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.7(%rip), %rsi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_45:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_elf_getdata
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_47
## %bb.46:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str.8(%rip), %rsi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_47:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	%r12, -232(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_elf_newdata
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_49
## %bb.48:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.9(%rip), %rsi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_49:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	(%r13), %eax
	movl	%eax, (%r12)
	movq	8(%r13), %rax
	movq	%rax, 8(%r12)
	movb	4(%r13), %al
	movb	%al, 4(%r12)
	movl	28(%r13), %eax
	movl	%eax, 28(%r12)
	movl	24(%r13), %eax
	movl	%eax, 24(%r12)
	movl	-176(%rbp), %eax
	cmpq	%rax, %r14
	jne	LBB0_51
## %bb.50:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	_CTF_ELF_SCN_NAME@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_strlen
	movl	%eax, %ebx
	incb	%bl
	movb	4(%r12), %al
	addb	%bl, %al
	addb	-72(%rbp), %al
	movsbl	%al, %edi
	callq	_xmalloc
	movq	%rax, 16(%r12)
	movq	16(%r13), %rsi
	movsbq	-72(%rbp), %rdx
	movq	%rax, %rdi
	callq	_memmove
	movsbq	-72(%rbp), %rdi
	shlq	$5, %rdi
	addq	16(%r12), %rdi
	movq	(%r15), %rsi
	leaq	-112(%rbp), %r15
	callq	_strcpy
	movsbq	-72(%rbp), %rcx
	movq	%rcx, %rax
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leal	(%rcx,%rbx), %eax
	movb	%al, -72(%rbp)
	addb	%bl, 4(%r12)
	cmpl	$0, -184(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	$1, %ecx
	cmovnel	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_51:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-224(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -104(%rbp)
	jne	LBB0_62
## %bb.52:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	-68(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_62
## %bb.53:                              ##   in Loop: Header=BB0_30 Depth=1
	movsbl	-72(%rbp), %edi
	movl	%edi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %eax
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	callq	_xmalloc
	movq	%rax, 16(%r12)
	movq	16(%r13), %rsi
	movsbq	-72(%rbp), %rdx
	movq	%rax, %rdi
	callq	_memmove
	testl	%ebx, %ebx
	jle	LBB0_62
## %bb.54:                              ##   in Loop: Header=BB0_30 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_55
	.p2align	4, 0x90
LBB0_60:                                ##   in Loop: Header=BB0_55 Depth=2
	incl	%r15d
	cmpl	%r15d, %ebx
	je	LBB0_61
LBB0_55:                                ##   Parent Loop BB0_30 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%r15d, %esi
	leaq	-200(%rbp), %rdx
	callq	_gelf_getsym
	testq	%rax, %rax
	jne	LBB0_57
## %bb.56:                              ##   in Loop: Header=BB0_55 Depth=2
	leaq	L_.str.10(%rip), %rdi
	movl	%r15d, %esi
	callq	_printf
LBB0_57:                                ##   in Loop: Header=BB0_55 Depth=2
	movq	-200(%rbp), %rcx
	movq	_SHN_LORESERVE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jae	LBB0_60
## %bb.58:                              ##   in Loop: Header=BB0_55 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %eax
	movswq	%ax, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_60
## %bb.59:                              ##   in Loop: Header=BB0_55 Depth=2
	movl	%eax, %ecx
	shll	$16, %ecx
	cwtl
	cmpl	$-65536, %ecx                   ## imm = 0xFFFF0000
	movl	$1, %ecx
	cmovel	%ecx, %eax
	cltq
	movq	%rax, -200(%rbp)
	movq	%r12, %rdi
	movl	%r15d, %esi
	leaq	-200(%rbp), %rdx
	callq	_gelf_update_sym
	jmp	LBB0_60
LBB0_61:                                ##   in Loop: Header=BB0_30 Depth=1
	leaq	-112(%rbp), %r15
LBB0_62:                                ##   in Loop: Header=BB0_30 Depth=1
	cmpq	$0, 16(%r12)
	jne	LBB0_65
## %bb.63:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpq	$0, 16(%r13)
	je	LBB0_65
## %bb.64:                              ##   in Loop: Header=BB0_30 Depth=1
	movsbl	-72(%rbp), %edi
	callq	_xmalloc
	movq	%rax, 16(%r12)
	movq	16(%r13), %rsi
	movsbq	-72(%rbp), %rdx
	movq	%rax, %rdi
	callq	_memmove
LBB0_65:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-232(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	callq	_gelf_update_shdr
	testq	%rax, %rax
	jne	LBB0_67
## %bb.66:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.7(%rip), %rsi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
	jmp	LBB0_67
LBB0_12:
	xorl	%r13d, %r13d
LBB0_14:
	xorl	%eax, %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-192(%rbp), %r14                ## 8-byte Reload
LBB0_70:
	movl	-120(%rbp), %eax                ## 4-byte Reload
	testl	%eax, 16(%rbp)
	leaq	L_.str.13(%rip), %rax
	leaq	L_.str.12(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.11(%rip), %rdi
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	callq	_terminate
	movl	$-1, %r15d
LBB0_71:
	movq	%r12, %rdi
	callq	_elf_newscn
	movq	%rax, %rbx
	leaq	-112(%rbp), %rsi
	movq	%rax, %rdi
	callq	_gelf_getshdr
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -112(%rbp)
	movq	_SHT_PROGBITS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)
	movb	%r14b, -72(%rbp)
	movl	%r15d, -80(%rbp)
	movq	$4, -96(%rbp)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_74
## %bb.72:
	cmpl	$0, -184(%rbp)
	je	LBB0_74
## %bb.73:
	movl	%r13d, %eax
	andl	$3, %eax
	movl	$4, %ecx
	subl	%eax, %ecx
	testl	%eax, %eax
	cmovel	%eax, %ecx
	addq	%r13, %rcx
	movq	%rcx, -88(%rbp)
	movsbq	%r14b, %r13
	addq	%rcx, %r13
LBB0_74:
	movq	%rbx, %rdi
	callq	_elf_newdata
	movq	-216(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, 16(%rax)
	movb	%r14b, 4(%rax)
	movl	-96(%rbp), %ecx
	movl	%ecx, (%rax)
	movq	$0, 8(%rax)
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_gelf_update_shdr
	cmpl	$0, -184(%rbp)
	je	LBB0_79
## %bb.75:
	movq	_ELF_T_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EV_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_gelf_fsize
	movq	%rax, %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_76
## %bb.77:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_78
LBB0_69:
	movl	-116(%rbp), %r15d               ## 4-byte Reload
	cmpl	$-1, %r15d
	movq	-192(%rbp), %r14                ## 8-byte Reload
	jne	LBB0_71
	jmp	LBB0_70
LBB0_76:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_78:
	subq	%rdx, %rcx
	testq	%rdx, %rdx
	cmoveq	%rdx, %rcx
	addq	%r13, %rcx
	movq	%rcx, -248(%rbp)
LBB0_79:
	movslq	-176(%rbp), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%rax,4), %eax
	movl	%eax, -256(%rbp)
	leaq	-264(%rbp), %rsi
	movq	%r12, %rdi
	callq	_gelf_update_ehdr
	movq	_ELF_C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_elf_update
	testq	%rax, %rax
	jns	LBB0_81
## %bb.80:
	leaq	L_.str.14(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_elfterminate
LBB0_81:
	movq	%rbx, %rdi
	callq	_free
	addq	$232, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTF_USE_DYNSYM,4,2             ## @CTF_USE_DYNSYM
	.comm	_CTF_KEEP_STABS,4,2             ## @CTF_KEEP_STABS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot copy ehdr to temp file"

	.comm	_SHT_DYNSYM,8,3                 ## @SHT_DYNSYM
	.comm	_SHT_SYMTAB,8,3                 ## @SHT_SYMTAB
	.comm	_ELF_C_SET,4,2                  ## @ELF_C_SET
	.comm	_ELF_F_LAYOUT,4,2               ## @ELF_F_LAYOUT
L_.str.1:                               ## @.str.1
	.asciz	"Cannot make phdrs in temp file"

L_.str.2:                               ## @.str.2
	.asciz	"Can't find string at %u"

	.comm	_CTF_ELF_SCN_NAME,8,3           ## @CTF_ELF_SCN_NAME
L_.str.3:                               ## @.str.3
	.asciz	".stab"

L_.str.4:                               ## @.str.4
	.asciz	".debug"

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

L_.str.6:                               ## @.str.6
	.asciz	".rela.debug"

	.comm	_SHT_REL,8,3                    ## @SHT_REL
	.comm	_SHT_RELA,8,3                   ## @SHT_RELA
L_.str.7:                               ## @.str.7
	.asciz	"Cannot update sect %s"

L_.str.8:                               ## @.str.8
	.asciz	"Cannot get sect %s data"

L_.str.9:                               ## @.str.9
	.asciz	"Can't make sect %s data"

L_.str.10:                              ## @.str.10
	.asciz	"Could not get symbol %d\n"

	.comm	_SHN_LORESERVE,8,3              ## @SHN_LORESERVE
	.comm	_SHT_NOBITS,8,3                 ## @SHT_NOBITS
L_.str.11:                              ## @.str.11
	.asciz	"%s: Cannot find %s section\n"

L_.str.12:                              ## @.str.12
	.asciz	"SHT_DYNSYM"

L_.str.13:                              ## @.str.13
	.asciz	"SHT_SYMTAB"

	.comm	_SHT_PROGBITS,8,3               ## @SHT_PROGBITS
	.comm	_ELF_T_ADDR,4,2                 ## @ELF_T_ADDR
	.comm	_EV_CURRENT,4,2                 ## @EV_CURRENT
	.comm	_ELF_C_WRITE,4,2                ## @ELF_C_WRITE
L_.str.14:                              ## @.str.14
	.asciz	"Cannot finalize temp file"

	.no_dead_strip	_write_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_file
_write_file:                            ; @write_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x28, x27, [sp, #224]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #240]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #256]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.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	x22, x6
	stp	x4, x5, [sp, #16]               ; 16-byte Folded Spill
	str	x3, [sp, #72]                   ; 8-byte Folded Spill
	mov	x20, x2
	str	x1, [sp, #88]                   ; 8-byte Folded Spill
	mov	x25, x0
Lloh0:
	adrp	x8, _CTF_USE_DYNSYM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTF_USE_DYNSYM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w21, w8, w6
Lloh3:
	adrp	x8, _CTF_KEEP_STABS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTF_KEEP_STABS@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	bl	_gelf_getclass
	mov	x1, x0
	mov	x0, x20
	bl	_gelf_newehdr
	cbnz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	_elfterminate
LBB0_2:
	sub	x1, x29, #120
	mov	x0, x25
	bl	_gelf_getehdr
	add	x0, sp, #152
	sub	x1, x29, #120
	mov	w2, #32
	bl	_memcpy
	add	x1, sp, #152
	mov	x0, x20
	bl	_gelf_update_ehdr
Lloh8:
	adrp	x8, _SHT_DYNSYM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SHT_DYNSYM@GOTPAGEOFF]
Lloh10:
	adrp	x9, _SHT_SYMTAB@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SHT_SYMTAB@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldur	w8, [x29, #-120]
	cbz	w8, LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, _ELF_C_SET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ELF_C_SET@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _ELF_F_LAYOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ELF_F_LAYOUT@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_elf_flagelf
	ldur	w1, [x29, #-120]
	mov	x0, x20
	bl	_gelf_newphdr
	cbnz	x0, LBB0_5
; %bb.4:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	_elfterminate
LBB0_5:
	ldur	w8, [x29, #-120]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w19, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #104
	mov	x0, x25
	mov	x1, x19
	bl	_gelf_getphdr
	add	x2, sp, #104
	mov	x0, x20
	mov	x1, x19
	bl	_gelf_update_phdr
	add	w19, w19, #1
	ldur	w8, [x29, #-120]
	cmp	w19, w8
	b.lt	LBB0_7
LBB0_8:
	ldurb	w8, [x29, #-116]
	lsl	w8, w8, #2
	sxtb	w0, w8
	bl	_xmalloc
	mov	x23, x0
	ldur	w8, [x29, #-116]
	cmp	w8, #1
	str	w21, [sp, #84]                  ; 4-byte Folded Spill
	b.lt	LBB0_61
; %bb.9:
	str	x20, [sp, #64]                  ; 8-byte Folded Spill
	mov	x19, #0
	mov	w20, #0
Lloh20:
	adrp	x21, l_.str.2@PAGE
Lloh21:
	add	x21, x21, l_.str.2@PAGEOFF
	and	w27, w26, w22
	mov	w26, #-1
Lloh22:
	adrp	x22, l_.str.3@PAGE
Lloh23:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	str	w26, [x23, x19, lsl #2]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x19, x19, #1
	ldursw	x8, [x29, #-116]
	cmp	x19, x8
	b.ge	LBB0_23
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x19
	bl	_elf_getscn
	add	x1, sp, #104
	bl	_gelf_getshdr
	ldur	w1, [x29, #-112]
	ldr	x2, [sp, #104]
	mov	x0, x25
	bl	_elf_strptr
	mov	x28, x0
	cbnz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #104]
	str	x8, [sp]
	ldr	x0, [sp, #88]                   ; 8-byte Folded Reload
	mov	x1, x21
	bl	_elfterminate
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
Lloh24:
	adrp	x8, _CTF_ELF_SCN_NAME@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CTF_ELF_SCN_NAME@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
	mov	x0, x28
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	cbz	w27, LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #84]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #112]
Lloh27:
	adrp	x9, _SHT_SYMTAB@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SHT_SYMTAB@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w20, #1
	str	w20, [x23, x19, lsl #2]
	mov	x0, x28
	bl	_strlen
	mov	x20, x24
	b	LBB0_11
LBB0_19:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x28
	mov	x1, x22
	mov	w2, #5
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x28
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #6
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x28
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #10
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.22:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x28
Lloh34:
	adrp	x1, l_.str.6@PAGE
Lloh35:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w2, #11
	bl	_strncmp
	cbnz	x0, LBB0_16
	b	LBB0_10
LBB0_23:
	ldr	x21, [sp, #176]
	cmp	w8, #2
	b.lt	LBB0_62
; %bb.24:
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	mov	w24, #0
	mov	w8, #-1
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
Lloh36:
	adrp	x20, _SHN_LORESERVE@GOTPAGE
Lloh37:
	ldr	x20, [x20, _SHN_LORESERVE@GOTPAGEOFF]
	mov	w26, #1
	b	LBB0_27
LBB0_25:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [sp, #128]
	ldr	x9, [sp, #112]
Lloh38:
	adrp	x10, _SHT_NOBITS@GOTPAGE
Lloh39:
	ldr	x10, [x10, _SHT_NOBITS@GOTPAGEOFF]
Lloh40:
	ldr	x10, [x10]
	ldrsb	x11, [sp, #144]
	cmp	x9, x10
	csel	x9, xzr, x11, eq
	add	x21, x9, x8
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x26, x26, #1
	ldursw	x8, [x29, #-116]
	cmp	x26, x8
	b.ge	LBB0_73
LBB0_27:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_48 Depth 2
	mov	x0, x25
	mov	x1, x26
	bl	_elf_getscn
	mov	x19, x0
	add	x1, sp, #104
	bl	_gelf_getshdr
	ldr	w8, [x23, x26, lsl #2]
	cmn	w8, #1
	b.eq	LBB0_53
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x0, [sp, #64]                   ; 8-byte Folded Reload
	bl	_elf_newscn
	mov	x22, x0
	cbz	w24, LBB0_31
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	ldur	w8, [x29, #-120]
	cbz	w8, LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [sp, #120]
	udiv	x9, x21, x8
	msub	x9, x9, x8, x21
	sub	x8, x8, w9, sxtw
	cmp	w9, #0
	csel	x8, xzr, x8, eq
	add	x8, x8, x21
	str	x8, [sp, #128]
LBB0_31:                                ;   in Loop: Header=BB0_27 Depth=1
	ldrsw	x8, [sp, #136]
	ldr	w8, [x23, x8, lsl #2]
	str	w8, [sp, #136]
	ldr	x8, [sp, #112]
Lloh41:
	adrp	x9, _SHT_REL@GOTPAGE
Lloh42:
	ldr	x9, [x9, _SHT_REL@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
Lloh44:
	adrp	x10, _SHT_RELA@GOTPAGE
Lloh45:
	ldr	x10, [x10, _SHT_RELA@GOTPAGEOFF]
Lloh46:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_27 Depth=1
	ldrsw	x8, [sp, #140]
	ldr	w8, [x23, x8, lsl #2]
	str	w8, [sp, #140]
LBB0_33:                                ;   in Loop: Header=BB0_27 Depth=1
	ldur	w1, [x29, #-112]
	ldr	x2, [sp, #104]
	mov	x0, x25
	bl	_elf_strptr
	mov	x28, x0
	cbnz	x0, LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [sp, #104]
	str	x8, [sp]
	ldr	x0, [sp, #88]                   ; 8-byte Folded Reload
Lloh47:
	adrp	x1, l_.str.2@PAGE
Lloh48:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elfterminate
LBB0_35:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x1, sp, #104
	mov	x0, x22
	bl	_gelf_update_shdr
	cbnz	x0, LBB0_37
; %bb.36:                               ;   in Loop: Header=BB0_27 Depth=1
	str	x28, [sp]
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
Lloh49:
	adrp	x1, l_.str.7@PAGE
Lloh50:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_elfterminate
LBB0_37:                                ;   in Loop: Header=BB0_27 Depth=1
	mov	x0, x19
	mov	x1, #0
	bl	_elf_getdata
	mov	x27, x0
	cbnz	x0, LBB0_39
; %bb.38:                               ;   in Loop: Header=BB0_27 Depth=1
	str	x28, [sp]
	ldr	x0, [sp, #88]                   ; 8-byte Folded Reload
Lloh51:
	adrp	x1, l_.str.8@PAGE
Lloh52:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_elfterminate
LBB0_39:                                ;   in Loop: Header=BB0_27 Depth=1
	mov	x0, x22
	bl	_elf_newdata
	mov	x19, x0
	cbnz	x0, LBB0_41
; %bb.40:                               ;   in Loop: Header=BB0_27 Depth=1
	str	x28, [sp]
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
Lloh53:
	adrp	x1, l_.str.9@PAGE
Lloh54:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_elfterminate
LBB0_41:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	w8, [x27]
	str	w8, [x19]
	ldr	x8, [x27, #8]
	str	x8, [x19, #8]
	ldrb	w8, [x27, #4]
	strb	w8, [x19, #4]
	ldr	d0, [x27, #24]
	str	d0, [x19, #24]
	ldur	w8, [x29, #-112]
	cmp	x26, x8
	b.ne	LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_27 Depth=1
Lloh55:
	adrp	x8, _CTF_ELF_SCN_NAME@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CTF_ELF_SCN_NAME@GOTPAGEOFF]
Lloh57:
	ldr	x0, [x8]
	bl	_strlen
	ldrb	w8, [x19, #4]
	ldrb	w9, [sp, #144]
	mov	x21, x24
	add	w24, w0, #1
	add	w8, w24, w8
	add	w8, w8, w9
	sxtb	w0, w8
	bl	_xmalloc
	str	x0, [x19, #16]
	ldr	x1, [x27, #16]
	ldrsb	x2, [sp, #144]
	bl	_memmove
	ldr	x8, [x19, #16]
	ldrsb	x9, [sp, #144]
	add	x0, x8, x9, lsl #5
Lloh58:
	adrp	x8, _CTF_ELF_SCN_NAME@GOTPAGE
Lloh59:
	ldr	x8, [x8, _CTF_ELF_SCN_NAME@GOTPAGEOFF]
Lloh60:
	ldr	x1, [x8]
	bl	_strcpy
	ldrsb	x8, [sp, #144]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	add	w8, w8, w24
	strb	w8, [sp, #144]
	ldrb	w8, [x19, #4]
	add	w8, w8, w24
	mov	x24, x21
	strb	w8, [x19, #4]
	ldur	w8, [x29, #-120]
	cmp	w8, #0
	csinc	w24, w21, wzr, eq
LBB0_43:                                ;   in Loop: Header=BB0_27 Depth=1
	mov	w21, #-65536
	ldr	x8, [sp, #112]
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.ne	LBB0_56
; %bb.44:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	w8, [sp, #148]
	cbz	w8, LBB0_56
; %bb.45:                               ;   in Loop: Header=BB0_27 Depth=1
	str	x28, [sp, #48]                  ; 8-byte Folded Spill
	ldrsb	w0, [sp, #144]
	ldr	w9, [x23, x26, lsl #2]
	str	w9, [sp, #32]                   ; 4-byte Folded Spill
	sdiv	w28, w0, w8
	bl	_xmalloc
	str	x0, [x19, #16]
	ldr	x1, [x27, #16]
	ldrsb	x2, [sp, #144]
	bl	_memmove
	cmp	w28, #1
	b.lt	LBB0_55
; %bb.46:                               ;   in Loop: Header=BB0_27 Depth=1
	str	w24, [sp, #36]                  ; 4-byte Folded Spill
	mov	w24, #0
	b	LBB0_48
LBB0_47:                                ;   in Loop: Header=BB0_48 Depth=2
	add	w24, w24, #1
	cmp	w28, w24
	b.eq	LBB0_54
LBB0_48:                                ;   Parent Loop BB0_27 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x2, sp, #96
	mov	x0, x19
	mov	x1, x24
	bl	_gelf_getsym
	cbnz	x0, LBB0_50
; %bb.49:                               ;   in Loop: Header=BB0_48 Depth=2
Lloh61:
	adrp	x0, l_.str.10@PAGE
Lloh62:
	add	x0, x0, l_.str.10@PAGEOFF
	mov	x1, x24
	bl	_printf
LBB0_50:                                ;   in Loop: Header=BB0_48 Depth=2
	ldr	x8, [sp, #96]
	ldr	x9, [x20]
	cmp	x8, x9
	b.hs	LBB0_47
; %bb.51:                               ;   in Loop: Header=BB0_48 Depth=2
	ldr	w9, [x23, x8, lsl #2]
	cmp	x8, w9, sxth
	b.eq	LBB0_47
; %bb.52:                               ;   in Loop: Header=BB0_48 Depth=2
	sxth	w8, w9
	cmp	w21, w9, lsl #16
	csinc	w8, w8, wzr, ne
	sxtw	x8, w8
	str	x8, [sp, #96]
	add	x2, sp, #96
	mov	x0, x19
	mov	x1, x24
	bl	_gelf_update_sym
	b	LBB0_47
LBB0_53:                                ;   in Loop: Header=BB0_27 Depth=1
	mov	w24, #1
	b	LBB0_26
LBB0_54:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	w24, [sp, #36]                  ; 4-byte Folded Reload
LBB0_55:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	x28, [sp, #48]                  ; 8-byte Folded Reload
LBB0_56:                                ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_59
; %bb.57:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x8, [x27, #16]
	cbz	x8, LBB0_59
; %bb.58:                               ;   in Loop: Header=BB0_27 Depth=1
	ldrsb	w0, [sp, #144]
	bl	_xmalloc
	str	x0, [x19, #16]
	ldr	x1, [x27, #16]
	ldrsb	x2, [sp, #144]
	bl	_memmove
LBB0_59:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x1, sp, #104
	mov	x0, x22
	bl	_gelf_update_shdr
	cbnz	x0, LBB0_25
; %bb.60:                               ;   in Loop: Header=BB0_27 Depth=1
	str	x28, [sp]
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
Lloh63:
	adrp	x1, l_.str.7@PAGE
Lloh64:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_elfterminate
	b	LBB0_25
LBB0_61:
	mov	x21, #0
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	mov	w25, #0
	b	LBB0_63
LBB0_62:
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	mov	w25, #0
	ldr	x20, [sp, #64]                  ; 8-byte Folded Reload
LBB0_63:
	ldp	x24, x22, [sp, #16]             ; 16-byte Folded Reload
LBB0_64:
Lloh65:
	adrp	x8, l_.str.12@PAGE
Lloh66:
	add	x8, x8, l_.str.12@PAGEOFF
Lloh67:
	adrp	x9, l_.str.13@PAGE
Lloh68:
	add	x9, x9, l_.str.13@PAGEOFF
	ldr	w10, [sp, #84]                  ; 4-byte Folded Reload
	cmp	w10, #0
	csel	x2, x9, x8, eq
Lloh69:
	adrp	x0, l_.str.11@PAGE
Lloh70:
	add	x0, x0, l_.str.11@PAGEOFF
	ldr	x1, [sp, #88]                   ; 8-byte Folded Reload
	bl	_terminate
	mov	w26, #-1
LBB0_65:
	mov	x0, x20
	bl	_elf_newscn
	mov	x19, x0
	add	x1, sp, #104
	bl	_gelf_getshdr
Lloh71:
	adrp	x8, _SHT_PROGBITS@GOTPAGE
Lloh72:
	ldr	x8, [x8, _SHT_PROGBITS@GOTPAGEOFF]
Lloh73:
	ldr	x8, [x8]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	stp	x9, x8, [sp, #104]
	strb	w22, [sp, #144]
	str	w26, [sp, #136]
	mov	w8, #4
	str	x8, [sp, #120]
	cbz	w25, LBB0_68
; %bb.66:
	ldur	w8, [x29, #-120]
	cbz	w8, LBB0_68
; %bb.67:
	ands	w8, w21, #0x3
	mov	w9, #4
	sub	w8, w9, w8
	tst	w21, #0x3
	csel	w8, wzr, w8, eq
	add	x8, x21, x8
	str	x8, [sp, #128]
	add	x21, x8, w22, sxtb
LBB0_68:
	mov	x0, x19
	bl	_elf_newdata
	str	x24, [x0, #16]
	strb	w22, [x0, #4]
	ldr	x8, [sp, #120]
	str	w8, [x0]
	str	xzr, [x0, #8]
	add	x1, sp, #104
	mov	x0, x19
	bl	_gelf_update_shdr
	ldur	w8, [x29, #-120]
	cbz	w8, LBB0_70
; %bb.69:
Lloh74:
	adrp	x8, _ELF_T_ADDR@GOTPAGE
Lloh75:
	ldr	x8, [x8, _ELF_T_ADDR@GOTPAGEOFF]
Lloh76:
	ldr	w1, [x8]
Lloh77:
	adrp	x8, _EV_CURRENT@GOTPAGE
Lloh78:
	ldr	x8, [x8, _EV_CURRENT@GOTPAGEOFF]
Lloh79:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_gelf_fsize
	udiv	x8, x21, x0
	msub	x8, x8, x0, x21
	sub	x9, x0, x8
	cmp	x8, #0
	csel	x8, xzr, x9, eq
	add	x8, x8, x21
	str	x8, [sp, #168]
LBB0_70:
	ldursw	x8, [x29, #-112]
	ldr	w8, [x23, x8, lsl #2]
	str	w8, [sp, #160]
	add	x1, sp, #152
	mov	x0, x20
	bl	_gelf_update_ehdr
Lloh80:
	adrp	x8, _ELF_C_WRITE@GOTPAGE
Lloh81:
	ldr	x8, [x8, _ELF_C_WRITE@GOTPAGEOFF]
Lloh82:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_elf_update
	tbz	x0, #63, LBB0_72
; %bb.71:
Lloh83:
	adrp	x1, l_.str.14@PAGE
Lloh84:
	add	x1, x1, l_.str.14@PAGEOFF
	ldr	x0, [sp, #72]                   ; 8-byte Folded Reload
	bl	_elfterminate
LBB0_72:
	mov	x0, x23
	bl	_free
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #272]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #256]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #240]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_73:
	mov	x25, x24
	ldr	w26, [sp, #32]                  ; 4-byte Folded Reload
	cmn	w26, #1
	ldr	x20, [sp, #64]                  ; 8-byte Folded Reload
	ldp	x24, x22, [sp, #16]             ; 16-byte Folded Reload
	b.ne	LBB0_65
	b	LBB0_64
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpAdd	Lloh83, Lloh84
	.cfi_endproc
                                        ; -- End function
	.comm	_CTF_USE_DYNSYM,4,2             ; @CTF_USE_DYNSYM
	.comm	_CTF_KEEP_STABS,4,2             ; @CTF_KEEP_STABS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot copy ehdr to temp file"

	.comm	_SHT_DYNSYM,8,3                 ; @SHT_DYNSYM
	.comm	_SHT_SYMTAB,8,3                 ; @SHT_SYMTAB
	.comm	_ELF_C_SET,4,2                  ; @ELF_C_SET
	.comm	_ELF_F_LAYOUT,4,2               ; @ELF_F_LAYOUT
l_.str.1:                               ; @.str.1
	.asciz	"Cannot make phdrs in temp file"

l_.str.2:                               ; @.str.2
	.asciz	"Can't find string at %u"

	.comm	_CTF_ELF_SCN_NAME,8,3           ; @CTF_ELF_SCN_NAME
l_.str.3:                               ; @.str.3
	.asciz	".stab"

l_.str.4:                               ; @.str.4
	.asciz	".debug"

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

l_.str.6:                               ; @.str.6
	.asciz	".rela.debug"

	.comm	_SHT_REL,8,3                    ; @SHT_REL
	.comm	_SHT_RELA,8,3                   ; @SHT_RELA
l_.str.7:                               ; @.str.7
	.asciz	"Cannot update sect %s"

l_.str.8:                               ; @.str.8
	.asciz	"Cannot get sect %s data"

l_.str.9:                               ; @.str.9
	.asciz	"Can't make sect %s data"

l_.str.10:                              ; @.str.10
	.asciz	"Could not get symbol %d\n"

	.comm	_SHN_LORESERVE,8,3              ; @SHN_LORESERVE
	.comm	_SHT_NOBITS,8,3                 ; @SHT_NOBITS
l_.str.11:                              ; @.str.11
	.asciz	"%s: Cannot find %s section\n"

l_.str.12:                              ; @.str.12
	.asciz	"SHT_DYNSYM"

l_.str.13:                              ; @.str.13
	.asciz	"SHT_SYMTAB"

	.comm	_SHT_PROGBITS,8,3               ; @SHT_PROGBITS
	.comm	_ELF_T_ADDR,4,2                 ; @ELF_T_ADDR
	.comm	_EV_CURRENT,4,2                 ; @EV_CURRENT
	.comm	_ELF_C_WRITE,4,2                ; @ELF_C_WRITE
l_.str.14:                              ; @.str.14
	.asciz	"Cannot finalize temp file"

	.no_dead_strip	_write_file
.subsections_via_symbols
