	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_tga                      ## -- Begin function write_tga
	.p2align	4, 0x90
_write_tga:                             ## @write_tga
	.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
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_tga_type_true_color@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	%r13d, -76(%rbp)
	movl	%r12d, -72(%rbp)
	movl	%r12d, -68(%rbp)
	movl	$32, -64(%rbp)
	movl	-84(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-80(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-88(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-52(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-48(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-60(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-72(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-76(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-68(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-64(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movl	-56(%rbp), %esi
	movq	%rbx, %rdi
	callq	_TGA_WRITE
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_fwrite
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	setne	%cl
	negl	%ecx
	movl	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tga_type_true_color,4,2        ## @tga_type_true_color
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_tga                      ; -- Begin function write_tga
	.p2align	2
_write_tga:                             ; @write_tga
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh0:
	adrp	x8, _tga_type_true_color@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tga_type_true_color@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp]
	stp	w23, w22, [sp, #12]
	mov	w8, #32
	stp	w22, w8, [sp, #20]
	ldr	w1, [sp, #4]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #8]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #36]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #40]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #44]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #28]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #16]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #20]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #24]
	mov	x0, x20
	bl	_TGA_WRITE
	ldr	w1, [sp, #32]
	mov	x0, x20
	bl	_TGA_WRITE
	mov	x0, x21
	mov	w1, #1
	mov	x2, x19
	mov	x3, x20
	bl	_fwrite
	cmp	x0, x19
	csetm	w0, ne
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tga_type_true_color,4,2        ; @tga_type_true_color
.subsections_via_symbols
