	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_ihex                    ## -- Begin function create_ihex
	.p2align	4, 0x90
_create_ihex:                           ## @create_ihex
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_ELF_C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_elf_begin
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_2:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_elf_nextscn
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	leaq	-88(%rbp), %r15
	movq	_SHF_ALLOC@GOTPCREL(%rip), %r13
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	xorl	%eax, %eax
	callq	_elf_errno
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_elf_nextscn
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_gelf_getshdr
	testq	%rax, %rax
	je	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %eax
	testl	%eax, -88(%rbp)
	je	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rax
	movq	_SHT_NOBITS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -72(%rbp)
	je	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_elf_errno
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_elf_getdata
	testq	%rax, %rax
	je	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r14
	movq	8(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %esi
	cmpl	$65536, %esi                    ## imm = 0x10000
	jb	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%esi, %eax
	shrl	$16, %eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	callq	_ihex_write_04
	movl	-64(%rbp), %esi
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_ihex_write_00
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_elf_errno
	testl	%eax, %eax
	je	LBB0_6
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	callq	_elf_errno
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %edi
	callq	_elf_errmsg
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
LBB0_9:
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_gelf_getehdr
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_11:
	movl	-56(%rbp), %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ihex_write_05
	movl	%ebx, %edi
	callq	_ihex_write_01
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_C_READ,4,2                 ## @ELF_C_READ
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"elf_begin() failed: %s"

L_.str.1:                               ## @.str.1
	.asciz	"gelf_getshdr failed: %s"

	.comm	_SHF_ALLOC,4,2                  ## @SHF_ALLOC
	.comm	_SHT_NOBITS,8,3                 ## @SHT_NOBITS
L_.str.3:                               ## @.str.3
	.asciz	"elf_getdata failed: %s"

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

L_.str.5:                               ## @.str.5
	.asciz	"gelf_getehdr() failed: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_ihex                    ; -- Begin function create_ihex
	.p2align	2
_create_ihex:                           ; @create_ihex
	.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	x19, x1
Lloh0:
	adrp	x8, _ELF_C_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ELF_C_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_elf_begin
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_errx
LBB0_2:
	mov	x0, x20
	mov	x1, #0
	bl	_elf_nextscn
	cbz	x0, LBB0_18
; %bb.3:
	mov	x21, x0
	mov	w28, #0
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh10:
	adrp	x26, _SHF_ALLOC@GOTPAGE
Lloh11:
	ldr	x26, [x26, _SHF_ALLOC@GOTPAGEOFF]
Lloh12:
	adrp	x27, _SHT_NOBITS@GOTPAGE
Lloh13:
	ldr	x27, [x27, _SHT_NOBITS@GOTPAGEOFF]
Lloh14:
	adrp	x23, l_.str.3@PAGE
Lloh15:
	add	x23, x23, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x22
	bl	_warnx
	bl	_elf_errno
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_elf_nextscn
	mov	x21, x0
	cbz	x0, LBB0_18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x21
	bl	_gelf_getshdr
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	ldp	x9, x10, [sp, #16]
	cmp	x9, x8
	ccmp	x10, #0, #4, ne
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_elf_errno
	mov	x0, x21
	mov	x1, #0
	bl	_elf_getdata
	cbz	x0, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	ldr	x2, [x0, #8]
	cbz	x2, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x3, [x24]
	cbz	x3, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [sp, #32]
	cmp	w1, #16, lsl #12                ; =65536
	b.lo	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	lsr	w25, w1, #16
	cmp	w25, w28
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x25
	bl	_ihex_write_04
	ldr	w1, [sp, #32]
	mov	x28, x25
	ldp	x3, x2, [x24]
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_ihex_write_00
	b	LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_elf_errno
	cbz	w0, LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x23
	bl	_warnx
	b	LBB0_5
LBB0_18:
	bl	_elf_errno
	cbz	w0, LBB0_20
; %bb.19:
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warnx
LBB0_20:
	add	x1, sp, #40
	mov	x0, x20
	bl	_gelf_getehdr
	cbnz	x0, LBB0_22
; %bb.21:
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_errx
LBB0_22:
	ldr	w1, [sp, #40]
	mov	x0, x19
	bl	_ihex_write_05
	mov	x0, x19
	bl	_ihex_write_01
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_C_READ,4,2                 ; @ELF_C_READ
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"elf_begin() failed: %s"

l_.str.1:                               ; @.str.1
	.asciz	"gelf_getshdr failed: %s"

	.comm	_SHF_ALLOC,4,2                  ; @SHF_ALLOC
	.comm	_SHT_NOBITS,8,3                 ; @SHT_NOBITS
l_.str.3:                               ; @.str.3
	.asciz	"elf_getdata failed: %s"

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

l_.str.5:                               ; @.str.5
	.asciz	"gelf_getehdr() failed: %s"

.subsections_via_symbols
