	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_makemessage                    ## -- Begin function makemessage
	.p2align	4, 0x90
_makemessage:                           ## @makemessage
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_msgCount@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	incq	%rbx
	movq	%rbx, %rsi
	shlq	$4, %rsi
	movq	_message@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_realloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_msgCount@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	(%r13), %rax
	movq	_dot@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	subq	%rax, %rdx
	shrq	$4, %rdx
	testq	%rax, %rax
	cmoveq	%rax, %rdx
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovneq	%rdx, %rax
	shlq	$4, %rax
	movq	%r12, %rdx
	addq	%rax, %rdx
	movq	%rdx, (%rcx)
	movq	%r12, (%r13)
	leal	1(%r15), %eax
	cltq
	subq	%rax, %rbx
	shlq	$4, %rbx
	movq	%r14, %rdi
	callq	_fflush
	movq	%r14, %rdi
	callq	_fileno
	movl	%eax, %edi
	movl	$16, %esi
	xorl	%edx, %edx
	callq	_lseek
	movq	%r14, %rdi
	callq	_fileno
	movslq	%r15d, %rsi
	shlq	$4, %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_read
	cmpq	%rbx, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movq	(%r13), %rax
	movq	_msgCount@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	shlq	$4, %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax,%rcx)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Fclose                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_msgCount,4,2                   ## @msgCount
	.comm	_message,8,3                    ## @message
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Insufficient memory for %d messages\n"

	.comm	_dot,8,3                        ## @dot
L_.str.1:                               ## @.str.1
	.asciz	"Message temporary file corrupted"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_makemessage                    ; -- Begin function makemessage
	.p2align	2
_makemessage:                           ; @makemessage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _msgCount@GOTPAGE
Lloh1:
	ldr	x22, [x22, _msgCount@GOTPAGEOFF]
	ldrsw	x8, [x22]
	add	x24, x8, #1
	lsl	x1, x24, #4
Lloh2:
	adrp	x23, _message@GOTPAGE
Lloh3:
	ldr	x23, [x23, _message@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_realloc
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _dot@GOTPAGE
Lloh7:
	ldr	x9, [x9, _dot@GOTPAGEOFF]
	ldr	x10, [x9]
	sub	x10, x10, x8
	cmp	x8, #0
	ccmp	w20, #0, #4, ne
	lsr	x8, x10, #4
	csel	x8, xzr, x8, eq
	add	x8, x21, x8, lsl #4
	str	x8, [x9]
	str	x21, [x23]
	add	w8, w20, #1
	sub	x8, x24, w8, sxtw
	lsl	x21, x8, #4
	mov	x0, x19
	bl	_fflush
	mov	x0, x19
	bl	_fileno
	mov	w1, #16
	mov	w2, #0
	bl	_lseek
	mov	x0, x19
	bl	_fileno
	ldr	x8, [x23]
	add	x1, x8, w20, sxtw #4
	mov	x2, x21
	bl	_read
	cmp	x0, x21
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_4:
	ldr	x8, [x23]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #4
	stp	xzr, xzr, [x8]
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_Fclose
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_msgCount,4,2                   ; @msgCount
	.comm	_message,8,3                    ; @message
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Insufficient memory for %d messages\n"

	.comm	_dot,8,3                        ; @dot
l_.str.1:                               ; @.str.1
	.asciz	"Message temporary file corrupted"

.subsections_via_symbols
