	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IMG_TAPE_WriteByte             ## -- Begin function IMG_TAPE_WriteByte
	.p2align	4, 0x90
_IMG_TAPE_WriteByte:                    ## @IMG_TAPE_WriteByte
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movslq	(%rdi), %rax
	imulq	$-1837958071, %rax, %rbx        ## imm = 0x9272FC49
	shrq	$32, %rbx
	addl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	sarl	$10, %ebx
	addl	%eax, %ebx
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %eax
	imulq	$619051153, %rax, %rcx          ## imm = 0x24E5F891
	shrq	$32, %rcx
	subl	%ecx, %eax
	shrl	%eax
	addl	%ecx, %eax
	shrl	$9, %eax
	subl	%eax, %ebx
	cmpl	$6, %ebx
	jl	LBB0_5
## %bb.1:
	cmpq	$0, 8(%r15)
	jle	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	callq	_WriteRecord
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	addl	%ebx, 16(%r15)
LBB0_5:
	movq	8(%r15), %rsi
	incq	%rsi
	movq	%r15, %rdi
	callq	_EnlargeBuffer
	movq	8(%r15), %rax
	movq	24(%r15), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%r15)
	movl	%r14d, (%rcx,%rax,4)
	movl	$0, (%r15)
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IMG_TAPE_WriteByte             ; -- Begin function IMG_TAPE_WriteByte
	.p2align	2
_IMG_TAPE_WriteByte:                    ; @IMG_TAPE_WriteByte
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldrsw	x8, [x0]
	mov	x9, #-951
	movk	x9, #37490, lsl #16
	mul	x9, x8, x9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #10
	add	w8, w9, w8, lsr #31
	add	w9, w2, w2, lsl #2
	lsl	w9, w9, #1
	mov	w10, #63633
	movk	w10, #9445, lsl #16
	umull	x10, w9, w10
	lsr	x10, x10, #32
	sub	w9, w9, w10
	add	w9, w10, w9, lsr #1
	sub	w21, w8, w9, lsr #9
	cmp	w21, #6
	b.lt	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_WriteRecord
	cbz	w0, LBB0_6
LBB0_3:
	ldr	w8, [x19, #16]
	add	w8, w8, w21
	str	w8, [x19, #16]
LBB0_4:
	ldr	x8, [x19, #8]
	add	x1, x8, #1
	mov	x0, x19
	bl	_EnlargeBuffer
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	add	x10, x9, #1
	str	x10, [x19, #8]
	str	w20, [x8, x9, lsl #2]
	str	wzr, [x19]
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
