	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_srec2bin                       ## -- Begin function srec2bin
	.p2align	4, 0x90
_srec2bin:                              ## @srec2bin
	.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	$264, %rsp                      ## imm = 0x108
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$2, %edi
	jg	LBB0_2
## %bb.1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_2:
	movq	%rsi, %r14
	cmpl	$3, %edi
	jne	LBB0_3
## %bb.4:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	_BigEndian@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	movl	$-17958334, %ecx                ## imm = 0xFEEDFA42
	movl	$-559038910, %r15d              ## imm = 0xDEADBE42
	cmovel	%ecx, %r15d
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	testq	%rax, %rax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_printf
LBB0_7:
	movq	8(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r12
	movq	16(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_fopen
	movq	_fOut@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_RecStart@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_AddressCurrent@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	leaq	L_.str.8(%rip), %rdi
	movl	%r15d, %esi
	callq	_dumpfTell
	movl	%r15d, %edi
	callq	_binOut32
	movq	_inputline@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-304(%rbp), %rsi
	movq	%r12, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_readline
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.12:
	cmpl	$-1, %eax
	je	LBB0_18
## %bb.13:
	leaq	-304(%rbp), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, -304(%rbp)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rdi
	callq	_srecLine
	andl	%eax, %ebx
	xorl	%eax, %eax
	callq	_WaitDisplay
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_readline
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$-1, %eax
	jne	LBB0_14
LBB0_18:
	xorl	%eax, %eax
	callq	_binRecEnd
	movq	%r12, %rdi
	callq	_fclose
	movq	(%r13), %rdi
	movl	$1, %r14d
	testq	%rdi, %rdi
	jne	LBB0_19
	jmp	LBB0_20
LBB0_8:
	movq	8(%r14), %rsi
	leaq	L_.str.5(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_20
LBB0_10:
	movq	16(%r14), %rsi
	leaq	L_.str.7(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printf
	movq	%r12, %rdi
LBB0_19:
	callq	_fclose
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%r14d, %eax
	addq	$264, %rsp                      ## imm = 0x108
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_BigEndian,8,3                  ## @BigEndian
	.comm	_FALSE,8,3                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"\nEndian: %s, Tag is 0x%8X\n"

L_.str.2:                               ## @.str.2
	.asciz	"BIG"

L_.str.3:                               ## @.str.3
	.asciz	"LITTLE"

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

L_.str.5:                               ## @.str.5
	.asciz	"\nError: Opening input file, %s."

L_.str.6:                               ## @.str.6
	.asciz	"wb"

	.comm	_fOut,8,3                       ## @fOut
L_.str.7:                               ## @.str.7
	.asciz	"\nError: Opening Output file, %s."

	.comm	_RecStart,8,3                   ## @RecStart
	.comm	_AddressCurrent,4,2             ## @AddressCurrent
L_.str.8:                               ## @.str.8
	.asciz	"Tag"

	.comm	_inputline,8,3                  ## @inputline
L_str:                                  ## @str
	.asciz	"\nError: <srec2bin <srec input file> <bin output file>\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_srec2bin                       ; -- Begin function srec2bin
	.p2align	2
_srec2bin:                              ; @srec2bin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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 w27, -72
	.cfi_offset w28, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	cmp	w0, #2
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_str@PAGE
Lloh4:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_16
LBB0_2:
	mov	x20, x1
Lloh5:
	adrp	x24, _FALSE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
Lloh7:
	adrp	x23, _TRUE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
	cmp	w0, #3
	csel	x8, x24, x23, eq
Lloh9:
	adrp	x9, _BigEndian@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BigEndian@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh11:
	str	x8, [x9]
	cmp	x8, #0
	mov	w9, #48706
	movk	w9, #57005, lsl #16
	mov	w10, #64066
	movk	w10, #65261, lsl #16
	csel	w21, w10, w9, eq
	cbz	w2, LBB0_4
; %bb.3:
Lloh12:
	adrp	x9, l_.str.2@PAGE
Lloh13:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh14:
	adrp	x10, l_.str.3@PAGE
Lloh15:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	x8, #0
	csel	x8, x10, x9, eq
	stp	x8, x21, [sp]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_4:
	ldr	x0, [x20, #8]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_14
; %bb.5:
	mov	x19, x0
	ldr	x0, [x20, #16]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fopen
Lloh22:
	adrp	x22, _fOut@GOTPAGE
Lloh23:
	ldr	x22, [x22, _fOut@GOTPAGEOFF]
	str	x0, [x22]
	cbz	x0, LBB0_15
; %bb.6:
Lloh24:
	adrp	x8, _RecStart@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RecStart@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh26:
	str	x9, [x8]
Lloh27:
	adrp	x8, _AddressCurrent@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AddressCurrent@GOTPAGEOFF]
	mov	w9, #-1
Lloh29:
	str	w9, [x8]
Lloh30:
	adrp	x0, l_.str.8@PAGE
Lloh31:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x21
	bl	_dumpfTell
	mov	x0, x21
	bl	_binOut32
Lloh32:
	adrp	x8, _inputline@GOTPAGE
Lloh33:
	ldr	x8, [x8, _inputline@GOTPAGEOFF]
Lloh34:
	str	xzr, [x8]
	ldr	w20, [x23]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #256
	bl	_readline
	cbz	w20, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldrb	w8, [sp, #24]
	cbz	w8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #24
	bl	_srecLine
	and	w20, w0, w20
	bl	_WaitDisplay
	b	LBB0_7
LBB0_11:
	bl	_binRecEnd
	mov	x0, x19
	bl	_fclose
	ldr	x0, [x22]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_fclose
LBB0_13:
	mov	w0, #1
	b	LBB0_17
LBB0_14:
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh35:
	adrp	x0, l_.str.5@PAGE
Lloh36:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	b	LBB0_16
LBB0_15:
	ldr	x8, [x20, #16]
	str	x8, [sp]
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
	mov	x0, x19
	bl	_fclose
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_BigEndian,8,3                  ; @BigEndian
	.comm	_FALSE,8,3                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"\nEndian: %s, Tag is 0x%8X\n"

l_.str.2:                               ; @.str.2
	.asciz	"BIG"

l_.str.3:                               ; @.str.3
	.asciz	"LITTLE"

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

l_.str.5:                               ; @.str.5
	.asciz	"\nError: Opening input file, %s."

l_.str.6:                               ; @.str.6
	.asciz	"wb"

	.comm	_fOut,8,3                       ; @fOut
l_.str.7:                               ; @.str.7
	.asciz	"\nError: Opening Output file, %s."

	.comm	_RecStart,8,3                   ; @RecStart
	.comm	_AddressCurrent,4,2             ; @AddressCurrent
l_.str.8:                               ; @.str.8
	.asciz	"Tag"

	.comm	_inputline,8,3                  ; @inputline
l_str:                                  ; @str
	.asciz	"\nError: <srec2bin <srec input file> <bin output file>\n"

.subsections_via_symbols
