	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ihex_write
_ihex_write:                            ## @ihex_write
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %rbx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movl	%edi, -72(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	__LINE_BUFSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	cmpq	$17, %r12
	jb	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
LBB0_2:
	movl	$0, -56(%rbp)
	movb	$58, (%r15)
	movl	$1, -52(%rbp)
	leaq	-52(%rbp), %r13
	leaq	-56(%rbp), %r14
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movl	$1, %ecx
	movq	%r14, %r8
	callq	_write_num
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	$2, %ecx
	movq	%r14, %r8
	callq	_write_num
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	movq	%r14, %r8
	callq	_write_num
	testq	%r12, %r12
	je	LBB0_8
## %bb.3:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.4:
	leaq	(%rbx,%r12,4), %r13
	cmpq	%rbx, %r13
	jbe	LBB0_8
## %bb.5:
	leaq	-52(%rbp), %r14
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_write_num
	addq	$4, %rbx
	cmpq	%r13, %rbx
	jb	LBB0_6
	jmp	LBB0_8
LBB0_7:
	leaq	-52(%rbp), %rsi
	leaq	-56(%rbp), %r8
	movq	%r15, %rdi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_write_num
LBB0_8:
	xorl	%eax, %eax
	subl	-56(%rbp), %eax
	movzbl	%al, %edx
	leaq	-52(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_write_num
	movslq	-52(%rbp), %rax
	movb	$13, (%r15,%rax)
	leal	2(%rax), %edx
	movl	%edx, -52(%rbp)
	movb	$10, 1(%r15,%rax)
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	callq	_write
	movslq	-52(%rbp), %rcx
	cmpq	%rcx, %rax
	je	LBB0_10
## %bb.9:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__LINE_BUFSZ,4,2                ## @_LINE_BUFSZ
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal: ihex_write() sz too big"

L_.str.1:                               ## @.str.1
	.asciz	"write failed"

	.no_dead_strip	_ihex_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ihex_write
_ihex_write:                            ; @ihex_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x22, x5
	mov	x21, x4
	mov	x23, x3
	mov	x25, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, __LINE_BUFSZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, __LINE_BUFSZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x26, _EXIT_FAILURE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _EXIT_FAILURE@GOTPAGEOFF]
	cmp	x5, #17
	b.lo	LBB0_2
; %bb.1:
	ldr	w0, [x26]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
LBB0_2:
	mov	w8, #58
	strb	w8, [x20]
	mov	w8, #1
	stp	wzr, w8, [x29, #-80]
	sub	x1, x29, #76
	sub	x4, x29, #80
	mov	x0, x20
	mov	x2, x22
	mov	w3, #1
	bl	_write_num
	sub	x1, x29, #76
	sub	x4, x29, #80
	mov	x0, x20
	mov	x2, x25
	mov	w3, #2
	bl	_write_num
	sub	x1, x29, #76
	sub	x4, x29, #80
	mov	x0, x20
	mov	x2, x24
	mov	w3, #1
	bl	_write_num
	cbz	x22, LBB0_7
; %bb.3:
	cbz	x21, LBB0_6
; %bb.4:
	add	x22, x21, x22, lsl #2
	cmp	x22, x21
	b.ls	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21], #4
	sub	x1, x29, #76
	sub	x4, x29, #80
	mov	x0, x20
	mov	w3, #1
	bl	_write_num
	cmp	x21, x22
	b.lo	LBB0_5
	b	LBB0_7
LBB0_6:
	sub	x1, x29, #76
	sub	x4, x29, #80
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_write_num
LBB0_7:
	ldur	w8, [x29, #-80]
	neg	w8, w8
	and	w2, w8, #0xff
	sub	x1, x29, #76
	mov	x0, x20
	mov	w3, #1
	mov	x4, #0
	bl	_write_num
	ldursw	x8, [x29, #-76]
	mov	w9, #2573
	strh	w9, [x20, x8]
	add	w2, w8, #2
	stur	w2, [x29, #-76]
	mov	x0, x19
	mov	x1, x20
	bl	_write
	ldursw	x8, [x29, #-76]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x26]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_9:
	ldur	x8, [x29, #-72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	__LINE_BUFSZ,4,2                ; @_LINE_BUFSZ
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal: ihex_write() sz too big"

l_.str.1:                               ; @.str.1
	.asciz	"write failed"

	.no_dead_strip	_ihex_write
.subsections_via_symbols
