Program: mandelbrot

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_color                          ## -- Begin function color
	.p2align	4, 0x90
_color:                                 ## @color
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %esi
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %ecx
	leaq	L_.str(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function main
LCPI1_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI1_1:
	.quad	0x4008000000000000              ## double 3
LCPI1_2:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI1_3:
	.quad	0xbfe6666666666666              ## double -0.69999999999999996
LCPI1_4:
	.quad	0x4059000000000000              ## double 100
LCPI1_5:
	.quad	0x4000000000000000              ## double 2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$80, %rsp
	movl	$0, -4(%rbp)
	movl	$100, -64(%rbp)
	movsd	LCPI1_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, -72(%rbp)
	movl	$78, -76(%rbp)
	movl	$48, -80(%rbp)
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movl	-76(%rbp), %esi
	movl	-80(%rbp), %edx
	leaq	L_.str.2(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movl	$1, -60(%rbp)
LBB1_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB1_3 Depth 2
                                        ##       Child Loop BB1_5 Depth 3
	movl	-60(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jg	LBB1_17
## %bb.2:                               ##   in Loop: Header=BB1_1 Depth=1
	movl	$1, -56(%rbp)
LBB1_3:                                 ##   Parent Loop BB1_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB1_5 Depth 3
	movl	-56(%rbp), %eax
	cmpl	-76(%rbp), %eax
	jg	LBB1_15
## %bb.4:                               ##   in Loop: Header=BB1_3 Depth=2
	cvtsi2ssl	-56(%rbp), %xmm0
	cvtsi2ssl	-76(%rbp), %xmm1
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI1_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm1, %xmm0
	divsd	-72(%rbp), %xmm0
	movsd	LCPI1_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	movsd	LCPI1_3(%rip), %xmm1            ## xmm1 = mem[0],zero
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -40(%rbp)
	cvtsi2ssl	-60(%rbp), %xmm0
	cvtsi2ssl	-80(%rbp), %xmm1
	divss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI1_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm1, %xmm0
	divsd	-72(%rbp), %xmm0
	movsd	LCPI1_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -48(%rbp)
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -16(%rbp)
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -32(%rbp)
	movl	$1, -52(%rbp)
LBB1_5:                                 ##   Parent Loop BB1_1 Depth=1
                                        ##     Parent Loop BB1_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-52(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jge	LBB1_10
## %bb.6:                               ##   in Loop: Header=BB1_5 Depth=3
	movsd	-16(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-16(%rbp), %xmm2                ## xmm2 = mem[0],zero
	movsd	-32(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	-32(%rbp), %xmm1
	movq	%xmm1, %rax
	movabsq	$-9223372036854775808, %rcx     ## imm = 0x8000000000000000
	xorq	%rcx, %rax
	movq	%rax, %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	addsd	-40(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	LCPI1_5(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	-16(%rbp), %xmm0
	movsd	-32(%rbp), %xmm2                ## xmm2 = mem[0],zero
	movsd	-48(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-24(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-16(%rbp), %xmm2                ## xmm2 = mem[0],zero
	movsd	-32(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	-32(%rbp), %xmm1
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	LCPI1_4(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm1, %xmm0
	jbe	LBB1_8
## %bb.7:                               ##   in Loop: Header=BB1_5 Depth=3
	movl	$999999, -52(%rbp)              ## imm = 0xF423F
LBB1_8:                                 ##   in Loop: Header=BB1_5 Depth=3
	jmp	LBB1_9
LBB1_9:                                 ##   in Loop: Header=BB1_5 Depth=3
	movl	-52(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52(%rbp)
	jmp	LBB1_5
LBB1_10:                                ##   in Loop: Header=BB1_3 Depth=2
	cmpl	$99999, -52(%rbp)               ## imm = 0x1869F
	jge	LBB1_12
## %bb.11:                              ##   in Loop: Header=BB1_3 Depth=2
	leaq	L_.str.3(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	jmp	LBB1_13
LBB1_12:                                ##   in Loop: Header=BB1_3 Depth=2
	leaq	L_.str.4(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
LBB1_13:                                ##   in Loop: Header=BB1_3 Depth=2
	jmp	LBB1_14
LBB1_14:                                ##   in Loop: Header=BB1_3 Depth=2
	movl	-56(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -56(%rbp)
	jmp	LBB1_3
LBB1_15:                                ##   in Loop: Header=BB1_1 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
## %bb.16:                              ##   in Loop: Header=BB1_1 Depth=1
	movl	-60(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -60(%rbp)
	jmp	LBB1_1
LBB1_17:
	callq	_libmin_success
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"<%d,%d,%d>\n"

L_.str.1:                               ## @.str.1
	.asciz	"** Mandelbrot ASCII image\n"

L_.str.2:                               ## @.str.2
	.asciz	"** xres: %d, yres: %d\n"

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

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

L_.str.5:                               ## @.str.5
	.asciz	"\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_color                          ; -- Begin function color
	.p2align	2
_color:                                 ; @color
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	stur	w0, [x29, #-4]
	stur	w1, [x29, #-8]
	stur	w2, [x29, #-12]
	ldur	w8, [x29, #-4]
                                        ; implicit-def: $x11
	mov	x11, x8
	ldur	w8, [x29, #-8]
                                        ; implicit-def: $x10
	mov	x10, x8
	ldur	w9, [x29, #-12]
                                        ; implicit-def: $x8
	mov	x8, x9
	mov	x9, sp
	str	x11, [x9]
	str	x10, [x9, #8]
	str	x8, [x9, #16]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function main
lCPI1_0:
	.quad	0x4059000000000000              ; double 100
lCPI1_1:
	.quad	0xbfe6666666666666              ; double -0.69999999999999996
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	stur	wzr, [x29, #-4]
	mov	w8, #100
	str	w8, [sp, #32]
	fmov	d0, #1.00000000
	str	d0, [sp, #24]
	mov	w8, #78
	str	w8, [sp, #20]
	mov	w8, #48
	str	w8, [sp, #16]
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	ldr	w8, [sp, #20]
                                        ; implicit-def: $x10
	mov	x10, x8
	ldr	w9, [sp, #16]
                                        ; implicit-def: $x8
	mov	x8, x9
	mov	x9, sp
	str	x10, [x9]
	str	x8, [x9, #8]
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	mov	w8, #1
	str	w8, [sp, #36]
	b	LBB1_1
LBB1_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_3 Depth 2
                                        ;       Child Loop BB1_5 Depth 3
	ldr	w8, [sp, #36]
	ldr	w9, [sp, #16]
	subs	w8, w8, w9
	cset	w8, gt
	tbnz	w8, #0, LBB1_17
	b	LBB1_2
LBB1_2:                                 ;   in Loop: Header=BB1_1 Depth=1
	mov	w8, #1
	str	w8, [sp, #40]
	b	LBB1_3
LBB1_3:                                 ;   Parent Loop BB1_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB1_5 Depth 3
	ldr	w8, [sp, #40]
	ldr	w9, [sp, #20]
	subs	w8, w8, w9
	cset	w8, gt
	tbnz	w8, #0, LBB1_15
	b	LBB1_4
LBB1_4:                                 ;   in Loop: Header=BB1_3 Depth=2
	ldr	s0, [sp, #40]
	scvtf	s0, s0
	ldr	s1, [sp, #20]
	scvtf	s1, s1
	fdiv	s0, s0, s1
	fcvt	d0, s0
	fmov	d2, #0.50000000
	fsub	d0, d0, d2
	ldr	d1, [sp, #24]
	fdiv	d0, d0, d1
	adrp	x8, lCPI1_1@PAGE
	ldr	d3, [x8, lCPI1_1@PAGEOFF]
	fmov	d1, #3.00000000
	fmadd	d0, d0, d1, d3
	stur	d0, [x29, #-40]
	ldr	s0, [sp, #36]
	scvtf	s0, s0
	ldr	s3, [sp, #16]
	scvtf	s3, s3
	fdiv	s0, s0, s3
	fcvt	d0, s0
	fsub	d0, d0, d2
	ldr	d2, [sp, #24]
	fdiv	d0, d0, d2
	fmul	d0, d0, d1
	str	d0, [sp, #48]
	movi	d0, #0000000000000000
	stur	d0, [x29, #-16]
	stur	d0, [x29, #-32]
	mov	w8, #1
	str	w8, [sp, #44]
	b	LBB1_5
LBB1_5:                                 ;   Parent Loop BB1_1 Depth=1
                                        ;     Parent Loop BB1_3 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w8, [sp, #44]
	ldr	w9, [sp, #32]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB1_10
	b	LBB1_6
LBB1_6:                                 ;   in Loop: Header=BB1_5 Depth=3
	ldur	d0, [x29, #-16]
	ldur	d1, [x29, #-16]
	ldur	d2, [x29, #-32]
	ldur	d3, [x29, #-32]
	fmul	d2, d2, d3
	fnmsub	d0, d0, d1, d2
	ldur	d1, [x29, #-40]
	fadd	d0, d0, d1
	stur	d0, [x29, #-24]
	ldur	d1, [x29, #-16]
	fmov	d0, #2.00000000
	fmul	d0, d0, d1
	ldur	d1, [x29, #-32]
	ldr	d2, [sp, #48]
	fmadd	d0, d0, d1, d2
	stur	d0, [x29, #-32]
	ldur	d0, [x29, #-24]
	stur	d0, [x29, #-16]
	ldur	d0, [x29, #-16]
	ldur	d1, [x29, #-16]
	ldur	d2, [x29, #-32]
	ldur	d3, [x29, #-32]
	fmul	d2, d2, d3
	fmadd	d0, d0, d1, d2
	adrp	x8, lCPI1_0@PAGE
	ldr	d1, [x8, lCPI1_0@PAGEOFF]
	fcmp	d0, d1
	cset	w8, le
	tbnz	w8, #0, LBB1_8
	b	LBB1_7
LBB1_7:                                 ;   in Loop: Header=BB1_5 Depth=3
	mov	w8, #16959
	movk	w8, #15, lsl #16
	str	w8, [sp, #44]
	b	LBB1_8
LBB1_8:                                 ;   in Loop: Header=BB1_5 Depth=3
	b	LBB1_9
LBB1_9:                                 ;   in Loop: Header=BB1_5 Depth=3
	ldr	w8, [sp, #44]
	add	w8, w8, #1
	str	w8, [sp, #44]
	b	LBB1_5
LBB1_10:                                ;   in Loop: Header=BB1_3 Depth=2
	ldr	w8, [sp, #44]
	mov	w9, #34463
	movk	w9, #1, lsl #16
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB1_12
	b	LBB1_11
LBB1_11:                                ;   in Loop: Header=BB1_3 Depth=2
	adrp	x0, l_.str.3@PAGE
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_libmin_printf
	b	LBB1_13
LBB1_12:                                ;   in Loop: Header=BB1_3 Depth=2
	adrp	x0, l_.str.4@PAGE
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_libmin_printf
	b	LBB1_13
LBB1_13:                                ;   in Loop: Header=BB1_3 Depth=2
	b	LBB1_14
LBB1_14:                                ;   in Loop: Header=BB1_3 Depth=2
	ldr	w8, [sp, #40]
	add	w8, w8, #1
	str	w8, [sp, #40]
	b	LBB1_3
LBB1_15:                                ;   in Loop: Header=BB1_1 Depth=1
	adrp	x0, l_.str.5@PAGE
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_libmin_printf
	b	LBB1_16
LBB1_16:                                ;   in Loop: Header=BB1_1 Depth=1
	ldr	w8, [sp, #36]
	add	w8, w8, #1
	str	w8, [sp, #36]
	b	LBB1_1
LBB1_17:
	bl	_libmin_success
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"<%d,%d,%d>\n"

l_.str.1:                               ; @.str.1
	.asciz	"** Mandelbrot ASCII image\n"

l_.str.2:                               ; @.str.2
	.asciz	"** xres: %d, yres: %d\n"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"\n"

.subsections_via_symbols