	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drawrect                       ## -- Begin function drawrect
	.p2align	4, 0x90
_drawrect:                              ## @drawrect
	.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	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r12d
	movl	(%rdx), %esi
	movl	$2, %r13d
	movl	$16, -44(%rbp)                  ## 4-byte Folded Spill
	movq	%rdi, %r14
	cmpl	$128, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$131, %esi
	je	LBB0_4
## %bb.2:
	cmpl	$132, %esi
	jne	LBB0_12
## %bb.3:
	movl	$4, %r13d
	movl	$32, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_4:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	leaq	-88(%rbp), %rdi
	movq	%rdx, %rsi
	movq	%rax, %rdx
	callq	_col2pixel
	movl	12(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	movq	%r14, %rbx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	4(%rsi), %edx
	imull	%ecx, %edx
	addl	8(%rsi), %edx
	imull	-44(%rbp), %edx                 ## 4-byte Folded Reload
	sarl	$3, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rbx
	movl	%r13d, %r15d
	xorl	%r14d, %r14d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%ecx, %edx
	imull	-44(%rbp), %edx                 ## 4-byte Folded Reload
	sarl	$3, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rbx
	incl	%r14d
	cmpl	%eax, %r14d
	jge	LBB0_11
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_memcpy
	addq	%r15, %rbx
	decl	%r12d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_10
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	4(%rdx), %edx
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"drawrect: unknown pixelformat(%d) bpp:%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drawrect                       ; -- Begin function drawrect
	.p2align	2
_drawrect:                              ; @drawrect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x1
	mov	x22, x0
	ldr	w23, [x1]
	ldr	w1, [x2]
	mov	w21, #2
	mov	w24, #16
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #131
	b.eq	LBB0_4
; %bb.2:
	cmp	w1, #132
	b.ne	LBB0_12
; %bb.3:
	mov	w21, #4
	mov	w24, #32
LBB0_4:
	ldr	x8, [x20, #16]
	add	x0, sp, #8
	mov	x1, x2
	mov	x2, x8
	bl	_col2pixel
	ldr	w8, [x20, #12]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	mov	w25, #0
	ldr	w9, [x19]
	ldp	w10, w11, [x20, #4]
	madd	w10, w9, w10, w11
	mul	w10, w10, w24
	asr	w10, w10, #3
	add	x26, x22, w10, sxtw
	mov	w27, w21
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mul	w10, w9, w24
	asr	w10, w10, #3
	add	x26, x26, w10, sxtw
	add	w25, w25, #1
	cmp	w25, w8
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x28, x23
	mov	x22, x26
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [sp, #8]
	mov	x0, x22
	mov	x2, x21
	bl	_memcpy
	add	x22, x22, x27
	subs	w28, w28, #1
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x19]
	ldr	w8, [x20, #12]
	b	LBB0_6
LBB0_11:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	ldr	w2, [x2, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"drawrect: unknown pixelformat(%d) bpp:%d\n"

.subsections_via_symbols
