	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_file
_create_file:                           ## @create_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	$0, -56(%rbp)
	testq	%rsi, %rsi
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	_O_RDONLY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_open
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	leaq	-72(%rbp), %rsi
	movl	%r15d, %edi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	testq	%r12, %r12
	je	LBB0_7
LBB0_8:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r12, %rdi
	movl	$493, %edx                      ## imm = 0x1ED
	xorl	%eax, %eax
	callq	_open
	movl	%eax, -44(%rbp)
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_10
LBB0_5:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_err
	testq	%r12, %r12
	jne	LBB0_8
LBB0_7:
	leaq	-56(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_create_tempfile
LBB0_10:
	movl	%r15d, %edi
	callq	_ac_detect_ar
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_ac_create_ar
	cmpq	$0, -56(%rbp)
	je	LBB0_60
LBB0_61:
	xorl	%ebx, %ebx
	testq	%r12, %r12
	je	LBB0_63
## %bb.62:
	movq	%r12, %r13
	jmp	LBB0_67
LBB0_12:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_14:
	movq	_ETF_ELF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%r14)
	je	LBB0_34
## %bb.15:
	cmpq	%rax, 8(%r14)
	je	LBB0_20
## %bb.16:
	movq	16(%r14), %rax
	movq	_ELFCLASSNONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movq	_ELFCLASS64@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_18:
	movq	24(%r14), %rax
	movq	_ELFDATANONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.19:
	movq	_ELFDATA2LSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
LBB0_20:
	leaq	-88(%rbp), %rdi
	leaq	-76(%rbp), %rsi
	callq	_create_tempfile
	movl	-76(%rbp), %edi
	movq	_ELF_C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_elf_begin
	movq	%rax, 48(%r14)
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rbx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
	movq	48(%r14), %rax
LBB0_22:
	movq	_ELF_C_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_ELF_F_LAYOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_elf_flagelf
	movq	(%r14), %rax
	cmpq	$128, %rax
	je	LBB0_27
## %bb.23:
	cmpq	$130, %rax
	je	LBB0_26
## %bb.24:
	cmpq	$132, %rax
	jne	LBB0_28
## %bb.25:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_create_elf_from_binary
	jmp	LBB0_29
LBB0_63:
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_lstat
	cmpl	$-1, %eax
	je	LBB0_67
## %bb.64:
	cmpl	$1, -72(%rbp)
	jg	LBB0_66
## %bb.65:
	movl	-68(%rbp), %edi
	callq	_S_ISLNK
	testq	%rax, %rax
	je	LBB0_67
LBB0_66:
	movl	$1, %ebx
LBB0_67:
	movq	-56(%rbp), %rdi
	movl	-44(%rbp), %edx
	leaq	-92(%rbp), %rcx
	movq	%r13, %rsi
	movl	%ebx, %r8d
	callq	_copy_from_tempfile
	testq	%rax, %rax
	jns	LBB0_69
## %bb.68:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.12(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_69:
	movq	-56(%rbp), %rdi
	callq	_free
	movq	$0, -56(%rbp)
	movl	-92(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_70
LBB0_27:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_create_elf_from_srec
	jmp	LBB0_29
LBB0_26:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_create_elf_from_ihex
	jmp	LBB0_29
LBB0_28:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_29:
	movq	48(%r14), %rdi
	callq	_elf_end
	movl	%r15d, %edi
	callq	_close
	movq	-88(%rbp), %rdi
	movl	(%rbx), %esi
	xorl	%eax, %eax
	callq	_open
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_31
## %bb.30:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_31:
	movl	-76(%rbp), %edi
	callq	_close
	movq	-88(%rbp), %rdi
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_33
## %bb.32:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-88(%rbp), %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_33:
	movq	-88(%rbp), %rdi
	callq	_free
LBB0_34:
	movq	_ELF_C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_elf_begin
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	jne	LBB0_36
## %bb.35:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
	movq	40(%r14), %rax
LBB0_36:
	movq	%rax, %rdi
	callq	_elf_kind
	cmpl	$135, %eax
	je	LBB0_58
## %bb.37:
	cmpl	$134, %eax
	je	LBB0_40
## %bb.38:
	cmpl	$133, %eax
	jne	LBB0_57
## %bb.39:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_40:
	movl	-44(%rbp), %edi
	movq	_ELF_C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_elf_begin
	movq	%rax, 48(%r14)
	testq	%rax, %rax
	jne	LBB0_42
## %bb.41:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
	movq	48(%r14), %rax
LBB0_42:
	movq	_ELF_C_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_ELF_F_LAYOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_elf_flagelf
	movq	%r14, %rdi
	callq	_create_elf
	movq	48(%r14), %rdi
	callq	_elf_end
	movq	8(%r14), %rax
	movq	_ETF_ELF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_58
## %bb.43:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_47
## %bb.44:
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_46
## %bb.45:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_46:
	movq	-56(%rbp), %rdi
	callq	_free
LBB0_47:
	leaq	-56(%rbp), %rdi
	leaq	-60(%rbp), %rsi
	callq	_create_tempfile
	movl	-44(%rbp), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_49
## %bb.48:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_49:
	movq	8(%r14), %rax
	addq	$-128, %rax
	cmpq	$4, %rax
	ja	LBB0_55
## %bb.50:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_54:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_56
LBB0_57:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_58
LBB0_55:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rdx
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_56
LBB0_53:
	testq	%r12, %r12
	movl	-44(%rbp), %esi
	movl	-60(%rbp), %edx
	movq	%r12, %rcx
	cmoveq	%r13, %rcx
	movq	%r14, %rdi
	callq	_create_srec
	jmp	LBB0_56
LBB0_52:
	movl	-44(%rbp), %edi
	movl	-60(%rbp), %esi
	callq	_create_ihex
	jmp	LBB0_56
LBB0_51:
	movl	-44(%rbp), %edi
	movl	-60(%rbp), %esi
	callq	_create_binary
LBB0_56:
	movl	-44(%rbp), %edi
	callq	_close
	movl	-60(%rbp), %eax
	movl	%eax, -44(%rbp)
LBB0_58:
	movq	40(%r14), %rdi
	callq	_elf_end
	cmpq	$0, -56(%rbp)
	jne	LBB0_61
LBB0_60:
	movq	%r12, %r13
LBB0_70:
	leaq	L_.str.13(%rip), %rsi
	movq	%r13, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_73
## %bb.71:
	movl	-44(%rbp), %edi
	movl	-68(%rbp), %esi
	callq	_fchmod
	cmpl	$-1, %eax
	jne	LBB0_73
## %bb.72:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.14(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_73:
	movq	_PRESERVE_DATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 32(%r14)
	je	LBB0_76
## %bb.74:
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_elftc_set_timestamps
	testq	%rax, %rax
	jns	LBB0_76
## %bb.75:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.15(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_76:
	movl	%r15d, %edi
	callq	_close
	movl	-44(%rbp), %edi
	callq	_close
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_53, LBB0_53-LJTI0_0
.set L0_0_set_54, LBB0_54-LJTI0_0
.set L0_0_set_52, LBB0_52-LJTI0_0
.set L0_0_set_51, LBB0_51-LJTI0_0
LJTI0_0:
	.long	L0_0_set_53
	.long	L0_0_set_54
	.long	L0_0_set_52
	.long	L0_0_set_54
	.long	L0_0_set_51
	.end_data_region
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"internal: src == NULL"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"open %s failed"

L_.str.2:                               ## @.str.2
	.asciz	"fstat %s failed"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.3:                               ## @.str.3
	.asciz	"lseek failed"

	.comm	_ETF_ELF,8,3                    ## @ETF_ELF
	.comm	_ELFCLASSNONE,8,3               ## @ELFCLASSNONE
	.comm	_ELFCLASS64,8,3                 ## @ELFCLASS64
	.comm	_ELFDATANONE,8,3                ## @ELFDATANONE
	.comm	_ELFDATA2LSB,8,3                ## @ELFDATA2LSB
	.comm	_ELF_C_WRITE,4,2                ## @ELF_C_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"elf_begin() failed: %s"

	.comm	_ELF_C_SET,4,2                  ## @ELF_C_SET
	.comm	_ELF_F_LAYOUT,4,2               ## @ELF_F_LAYOUT
L_.str.5:                               ## @.str.5
	.asciz	"Internal: invalid target flavour"

L_.str.6:                               ## @.str.6
	.asciz	"unlink %s failed"

	.comm	_ELF_C_READ,4,2                 ## @ELF_C_READ
L_.str.7:                               ## @.str.7
	.asciz	"file format not recognized"

L_.str.8:                               ## @.str.8
	.asciz	"lseek failed for the output object"

L_.str.9:                               ## @.str.9
	.asciz	"PE/EFI support not enabled at compile time"

L_.str.10:                              ## @.str.10
	.asciz	"Internal: unsupported output flavour %d"

L_.str.11:                              ## @.str.11
	.asciz	"file format not supported"

L_.str.12:                              ## @.str.12
	.asciz	"creation of %s failed"

L_.str.13:                              ## @.str.13
	.asciz	"/dev/null"

L_.str.14:                              ## @.str.14
	.asciz	"fchmod %s failed"

	.comm	_PRESERVE_DATE,4,2              ## @PRESERVE_DATE
L_.str.15:                              ## @.str.15
	.asciz	"setting timestamps failed"

	.no_dead_strip	_create_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_file
_create_file:                           ; @create_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x2
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #32]
	cbnz	x1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
LBB0_2:
Lloh5:
	adrp	x24, _O_RDONLY@GOTPAGE
Lloh6:
	ldr	x24, [x24, _O_RDONLY@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_open
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_4:
	add	x1, sp, #40
	mov	x0, x21
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.5:
	cbz	x22, LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w8, #493
	str	x8, [sp]
	mov	x0, x22
	bl	_open
	str	w0, [sp, #16]
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.7:
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
	b	LBB0_10
LBB0_8:
Lloh23:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
	cbnz	x22, LBB0_6
LBB0_9:
	add	x0, sp, #32
	add	x1, sp, #16
	bl	_create_tempfile
LBB0_10:
	mov	x0, x21
	bl	_ac_detect_ar
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w2, [sp, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_ac_create_ar
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_70
LBB0_12:
	cbz	x22, LBB0_28
; %bb.13:
	mov	w4, #0
	mov	x19, x22
	b	LBB0_33
LBB0_14:
Lloh28:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_lseek
	tbz	x0, #63, LBB0_16
; %bb.15:
Lloh31:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_16:
	ldr	x9, [x20]
Lloh36:
	adrp	x25, _ETF_ELF@GOTPAGE
Lloh37:
	ldr	x25, [x25, _ETF_ELF@GOTPAGEOFF]
Lloh38:
	adrp	x28, _ELF_C_WRITE@GOTPAGE
Lloh39:
	ldr	x28, [x28, _ELF_C_WRITE@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh40:
	adrp	x26, _ELF_C_SET@GOTPAGE
Lloh41:
	ldr	x26, [x26, _ELF_C_SET@GOTPAGEOFF]
Lloh42:
	adrp	x27, _ELF_F_LAYOUT@GOTPAGE
Lloh43:
	ldr	x27, [x27, _ELF_F_LAYOUT@GOTPAGEOFF]
	cmp	x9, x8
	b.eq	LBB0_44
; %bb.17:
	ldr	x9, [x20, #8]
	cmp	x9, x8
	b.eq	LBB0_22
; %bb.18:
	ldr	x8, [x20, #16]
Lloh44:
	adrp	x9, _ELFCLASSNONE@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ELFCLASSNONE@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
Lloh47:
	adrp	x8, _ELFCLASS64@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ELFCLASS64@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	str	x8, [x20, #16]
LBB0_20:
	ldr	x8, [x20, #24]
Lloh50:
	adrp	x9, _ELFDATANONE@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ELFDATANONE@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:
Lloh53:
	adrp	x8, _ELFDATA2LSB@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ELFDATA2LSB@GOTPAGEOFF]
Lloh55:
	ldr	x8, [x8]
	str	x8, [x20, #24]
LBB0_22:
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_create_tempfile
	ldr	w0, [sp, #20]
	ldr	w1, [x28]
	mov	x2, #0
	bl	_elf_begin
	str	x0, [x20, #48]
	cbnz	x0, LBB0_24
; %bb.23:
Lloh56:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh58:
	ldr	w23, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh59:
	adrp	x1, l_.str.4@PAGE
Lloh60:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	bl	_errx
	ldr	x0, [x20, #48]
LBB0_24:
	ldr	w1, [x26]
	ldr	w2, [x27]
	bl	_elf_flagelf
	ldr	x8, [x20]
	cmp	x8, #128
	b.eq	LBB0_36
; %bb.25:
	cmp	x8, #130
	b.eq	LBB0_37
; %bb.26:
	cmp	x8, #132
	b.ne	LBB0_38
; %bb.27:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_create_elf_from_binary
	b	LBB0_39
LBB0_28:
	add	x1, sp, #40
	mov	x0, x19
	bl	_lstat
	cmn	w0, #1
	b.eq	LBB0_32
; %bb.29:
	ldr	w8, [sp, #40]
	cmp	w8, #1
	b.gt	LBB0_31
; %bb.30:
	ldr	w0, [sp, #44]
	bl	_S_ISLNK
	cbz	x0, LBB0_32
LBB0_31:
	mov	w4, #1
	b	LBB0_33
LBB0_32:
	mov	w4, #0
LBB0_33:
	ldr	x0, [sp, #32]
	ldr	w2, [sp, #16]
	add	x3, sp, #8
	mov	x1, x19
	bl	_copy_from_tempfile
	tbz	x0, #63, LBB0_35
; %bb.34:
Lloh61:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh62:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh64:
	adrp	x1, l_.str.12@PAGE
Lloh65:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_err
LBB0_35:
	ldr	x0, [sp, #32]
	bl	_free
	str	xzr, [sp, #32]
	ldr	w8, [sp, #8]
	str	w8, [sp, #16]
	b	LBB0_71
LBB0_36:
	mov	x0, x20
	mov	x1, x21
	bl	_create_elf_from_srec
	b	LBB0_39
LBB0_37:
	mov	x0, x20
	mov	x1, x21
	bl	_create_elf_from_ihex
	b	LBB0_39
LBB0_38:
Lloh66:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh68:
	ldr	w0, [x8]
Lloh69:
	adrp	x1, l_.str.5@PAGE
Lloh70:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_errx
LBB0_39:
	ldr	x0, [x20, #48]
	bl	_elf_end
	mov	x0, x21
	bl	_close
	ldr	x0, [sp, #24]
	ldr	w1, [x24]
	bl	_open
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_41
; %bb.40:
Lloh71:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh72:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh73:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh74:
	adrp	x1, l_.str.1@PAGE
Lloh75:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_41:
	ldr	w0, [sp, #20]
	bl	_close
	ldr	x0, [sp, #24]
	bl	_unlink
	tbz	x0, #63, LBB0_43
; %bb.42:
Lloh76:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh77:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh78:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
	str	x8, [sp]
Lloh79:
	adrp	x1, l_.str.6@PAGE
Lloh80:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_err
LBB0_43:
	ldr	x0, [sp, #24]
	bl	_free
LBB0_44:
Lloh81:
	adrp	x8, _ELF_C_READ@GOTPAGE
Lloh82:
	ldr	x8, [x8, _ELF_C_READ@GOTPAGEOFF]
Lloh83:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_elf_begin
	str	x0, [x20, #40]
	cbnz	x0, LBB0_46
; %bb.45:
Lloh84:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh85:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh86:
	ldr	w23, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh87:
	adrp	x1, l_.str.4@PAGE
Lloh88:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	bl	_errx
	ldr	x0, [x20, #40]
LBB0_46:
	bl	_elf_kind
	cmp	w0, #135
	b.eq	LBB0_69
; %bb.47:
	cmp	w0, #134
	b.eq	LBB0_50
; %bb.48:
Lloh89:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh90:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
	cmp	w0, #133
	b.ne	LBB0_62
; %bb.49:
	ldr	w0, [x8]
Lloh91:
	adrp	x1, l_.str.7@PAGE
Lloh92:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_errx
LBB0_50:
	ldr	w0, [sp, #16]
	ldr	w1, [x28]
	mov	x2, #0
	bl	_elf_begin
	str	x0, [x20, #48]
	cbnz	x0, LBB0_52
; %bb.51:
Lloh93:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh94:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh95:
	ldr	w23, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh96:
	adrp	x1, l_.str.4@PAGE
Lloh97:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	bl	_errx
	ldr	x0, [x20, #48]
LBB0_52:
	ldr	w1, [x26]
	ldr	w2, [x27]
	bl	_elf_flagelf
	mov	x0, x20
	bl	_create_elf
	ldr	x0, [x20, #48]
	bl	_elf_end
	ldr	x8, [x20, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_69
; %bb.53:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_57
; %bb.54:
	bl	_unlink
	tbz	x0, #63, LBB0_56
; %bb.55:
Lloh98:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh99:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh100:
	ldr	w0, [x8]
	ldr	x8, [sp, #32]
	str	x8, [sp]
Lloh101:
	adrp	x1, l_.str.6@PAGE
Lloh102:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_err
LBB0_56:
	ldr	x0, [sp, #32]
	bl	_free
LBB0_57:
	add	x0, sp, #32
	add	x1, sp, #12
	bl	_create_tempfile
	ldr	w0, [sp, #16]
Lloh103:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh104:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh105:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	tbz	x0, #63, LBB0_59
; %bb.58:
Lloh106:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh107:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh108:
	ldr	w0, [x8]
Lloh109:
	adrp	x1, l_.str.8@PAGE
Lloh110:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_err
LBB0_59:
	ldr	x8, [x20, #8]
	sub	x8, x8, #128
	cmp	x8, #4
	b.hi	LBB0_63
; %bb.60:
Lloh111:
	adrp	x9, lJTI0_0@PAGE
Lloh112:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_61
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_61:
Lloh113:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh114:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh115:
	ldr	w0, [x8]
Lloh116:
	adrp	x1, l_.str.9@PAGE
Lloh117:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_64
LBB0_62:
	ldr	w0, [x8]
Lloh118:
	adrp	x1, l_.str.11@PAGE
Lloh119:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_errx
	b	LBB0_69
LBB0_63:
Lloh120:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh121:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh122:
	ldr	w0, [x8]
	ldr	x8, [x20, #16]
	str	x8, [sp]
Lloh123:
	adrp	x1, l_.str.10@PAGE
Lloh124:
	add	x1, x1, l_.str.10@PAGEOFF
LBB0_64:
	bl	_errx
	b	LBB0_68
LBB0_65:
	ldp	w2, w1, [sp, #12]
	cmp	x22, #0
	csel	x3, x19, x22, eq
	mov	x0, x20
	bl	_create_srec
	b	LBB0_68
LBB0_66:
	ldp	w1, w0, [sp, #12]
	bl	_create_ihex
	b	LBB0_68
LBB0_67:
	ldp	w1, w0, [sp, #12]
	bl	_create_binary
LBB0_68:
	ldr	w0, [sp, #16]
	bl	_close
	ldr	w8, [sp, #12]
	str	w8, [sp, #16]
LBB0_69:
	ldr	x0, [x20, #40]
	bl	_elf_end
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_12
LBB0_70:
	mov	x19, x22
LBB0_71:
Lloh125:
	adrp	x1, l_.str.13@PAGE
Lloh126:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_74
; %bb.72:
	ldr	w0, [sp, #16]
	ldr	w1, [sp, #44]
	bl	_fchmod
	cmn	w0, #1
	b.ne	LBB0_74
; %bb.73:
Lloh127:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh128:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh129:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh130:
	adrp	x1, l_.str.14@PAGE
Lloh131:
	add	x1, x1, l_.str.14@PAGEOFF
	bl	_err
LBB0_74:
	ldr	w8, [x20, #32]
Lloh132:
	adrp	x9, _PRESERVE_DATE@GOTPAGE
Lloh133:
	ldr	x9, [x9, _PRESERVE_DATE@GOTPAGEOFF]
Lloh134:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_77
; %bb.75:
	add	x1, sp, #40
	mov	x0, x19
	bl	_elftc_set_timestamps
	tbz	x0, #63, LBB0_77
; %bb.76:
Lloh135:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh136:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh137:
	ldr	w0, [x8]
Lloh138:
	adrp	x1, l_.str.15@PAGE
Lloh139:
	add	x1, x1, l_.str.15@PAGEOFF
	bl	_err
LBB0_77:
	mov	x0, x21
	bl	_close
	ldr	w0, [sp, #16]
	bl	_close
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpAdd	Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpAdd	Lloh116, Lloh117
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpAdd	Lloh118, Lloh119
	.loh AdrpAdd	Lloh123, Lloh124
	.loh AdrpLdrGotLdr	Lloh120, Lloh121, Lloh122
	.loh AdrpAdd	Lloh125, Lloh126
	.loh AdrpAdd	Lloh130, Lloh131
	.loh AdrpLdrGotLdr	Lloh127, Lloh128, Lloh129
	.loh AdrpLdrGotLdr	Lloh132, Lloh133, Lloh134
	.loh AdrpAdd	Lloh138, Lloh139
	.loh AdrpLdrGotLdr	Lloh135, Lloh136, Lloh137
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_65-LBB0_61)>>2
	.byte	(LBB0_61-LBB0_61)>>2
	.byte	(LBB0_66-LBB0_61)>>2
	.byte	(LBB0_61-LBB0_61)>>2
	.byte	(LBB0_67-LBB0_61)>>2
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"internal: src == NULL"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"open %s failed"

l_.str.2:                               ; @.str.2
	.asciz	"fstat %s failed"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.3:                               ; @.str.3
	.asciz	"lseek failed"

	.comm	_ETF_ELF,8,3                    ; @ETF_ELF
	.comm	_ELFCLASSNONE,8,3               ; @ELFCLASSNONE
	.comm	_ELFCLASS64,8,3                 ; @ELFCLASS64
	.comm	_ELFDATANONE,8,3                ; @ELFDATANONE
	.comm	_ELFDATA2LSB,8,3                ; @ELFDATA2LSB
	.comm	_ELF_C_WRITE,4,2                ; @ELF_C_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"elf_begin() failed: %s"

	.comm	_ELF_C_SET,4,2                  ; @ELF_C_SET
	.comm	_ELF_F_LAYOUT,4,2               ; @ELF_F_LAYOUT
l_.str.5:                               ; @.str.5
	.asciz	"Internal: invalid target flavour"

l_.str.6:                               ; @.str.6
	.asciz	"unlink %s failed"

	.comm	_ELF_C_READ,4,2                 ; @ELF_C_READ
l_.str.7:                               ; @.str.7
	.asciz	"file format not recognized"

l_.str.8:                               ; @.str.8
	.asciz	"lseek failed for the output object"

l_.str.9:                               ; @.str.9
	.asciz	"PE/EFI support not enabled at compile time"

l_.str.10:                              ; @.str.10
	.asciz	"Internal: unsupported output flavour %d"

l_.str.11:                              ; @.str.11
	.asciz	"file format not supported"

l_.str.12:                              ; @.str.12
	.asciz	"creation of %s failed"

l_.str.13:                              ; @.str.13
	.asciz	"/dev/null"

l_.str.14:                              ; @.str.14
	.asciz	"fchmod %s failed"

	.comm	_PRESERVE_DATE,4,2              ; @PRESERVE_DATE
l_.str.15:                              ; @.str.15
	.asciz	"setting timestamps failed"

	.no_dead_strip	_create_file
.subsections_via_symbols
