	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_carpet_slice
_draw_carpet_slice:                     ## @draw_carpet_slice
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rsi), %esi
	movl	%esi, %eax
	imull	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	incl	%ebx
	imull	%esi, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %r15d
	jge	LBB0_7
## %bb.1:
	movq	(%rdi), %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	movq	16(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%r15d, %edx
	imull	%eax, %edx
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	(%rcx), %rdi
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	shlq	$2, %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%eax, %rcx
	leaq	(%rdi,%rcx,4), %rdi
	incl	%r15d
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	je	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_fill_sierpinski
	movl	%r12d, %ecx
	andl	$-4, %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rdi
	cmpq	$1, %rax
	movl	$0, %esi
	sbbl	%esi, %esi
	callq	_AV_WL32
	addq	$4, %r12
	incl	%ebx
	cmpq	%r12, %r13
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_draw_carpet_slice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_carpet_slice
_draw_carpet_slice:                     ; @draw_carpet_slice
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x1, #4]
	mul	w9, w8, w2
	sdiv	w20, w9, w3
	add	w8, w8, w9
	sdiv	w23, w8, w3
	cmp	w20, w23
	b.ge	LBB0_7
; %bb.1:
	mov	x19, x1
	ldr	x21, [x0]
	ldr	w24, [x1]
	ldp	x9, x8, [x1, #8]
	ldr	x10, [x8]
	ldr	w8, [x9]
	mul	w9, w8, w20
	add	x25, x10, w9, sxtw #2
	lsl	x26, x24, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, w8, sxtw #2
	add	w20, w20, #1
	cmp	w20, w23
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w24, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w22, #0
	mov	x27, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_fill_sierpinski
	and	x8, x27, #0xfffffffc
	add	x8, x25, x8, lsl #2
	cmp	x0, #0
	csetm	w1, eq
	mov	x0, x8
	bl	_AV_WL32
	add	x27, x27, #4
	add	w22, w22, #1
	cmp	x26, x27
	b.ne	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	b	LBB0_2
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_draw_carpet_slice
.subsections_via_symbols
