	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function main
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0xbf800000                      ## float -1
LCPI0_3:
	.long	0x42c80000                      ## float 100
LCPI0_4:
	.long	0xbf000000                      ## float -0.5
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x4014000000000000              ## double 5
	.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
	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
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %edi
	callq	_srand
	movq	_error_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glfwSetErrorCallback
	xorl	%eax, %eax
	callq	_glfwInit
	testl	%eax, %eax
	jne	LBB0_2
LBB0_1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_2:
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%rbx, %rdi
	callq	_close_window
	incl	%r15d
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movl	$640, %r12d                     ## imm = 0x280
	movl	$480, %r13d                     ## imm = 0x1E0
	testb	$1, %r15b
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	-44(%rbp), %rdi
	callq	_glfwGetMonitors
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_rand
	cltd
	idivl	-44(%rbp)
	movslq	%edx, %rax
	movq	(%rbx,%rax,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_glfwGetVideoMode
	movl	(%rax), %r12d
	movl	4(%rax), %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	_open_window
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	_GL_PROJECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glMatrixMode
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movapd	%xmm0, %xmm2
	movapd	%xmm1, %xmm3
	movapd	%xmm1, %xmm4
	movapd	%xmm0, %xmm5
	callq	_glOrtho
	movq	_GL_MODELVIEW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glMatrixMode
	xorpd	%xmm0, %xmm0
	callq	_glfwSetTime
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_glfwGetTime
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	(%r14), %edi
	callq	_glClear
	xorl	%eax, %eax
	callq	_glPushMatrix
	xorl	%eax, %eax
	callq	_glfwGetTime
	cvtsd2ss	%xmm0, %xmm0
	mulss	LCPI0_3(%rip), %xmm0
	xorpd	%xmm1, %xmm1
	xorpd	%xmm2, %xmm2
	movss	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	callq	_glRotatef
	movss	LCPI0_4(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movapd	%xmm2, %xmm3
	callq	_glRectf
	xorl	%eax, %eax
	callq	_glPopMatrix
	movq	%rbx, %rdi
	callq	_glfwSwapBuffers
	xorl	%eax, %eax
	callq	_glfwPollEvents
	movq	%rbx, %rdi
	callq	_glfwWindowShouldClose
	testq	%rax, %rax
	je	LBB0_11
## %bb.13:
	movq	%rbx, %rdi
	callq	_close_window
	leaq	L_str.2(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_glfwTerminate
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_14:
	xorl	%eax, %eax
	callq	_glfwTerminate
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_error_callback,4,2             ## @error_callback
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_GL_PROJECTION,4,2              ## @GL_PROJECTION
	.comm	_GL_MODELVIEW,4,2               ## @GL_MODELVIEW
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Closing window"

L_str.2:                                ## @str.2
	.asciz	"User closed window"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x0, #0
	bl	_time
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_srand
Lloh0:
	adrp	x8, _error_callback@GOTPAGE
Lloh1:
	ldr	x8, [x8, _error_callback@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_glfwSetErrorCallback
	bl	_glfwInit
	cbnz	w0, LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_exit
LBB0_2:
	mov	w21, #0
Lloh6:
	adrp	x22, _GL_PROJECTION@GOTPAGE
Lloh7:
	ldr	x22, [x22, _GL_PROJECTION@GOTPAGEOFF]
Lloh8:
	adrp	x23, _GL_MODELVIEW@GOTPAGE
Lloh9:
	ldr	x23, [x23, _GL_MODELVIEW@GOTPAGEOFF]
	fmov	d8, #5.00000000
Lloh10:
	adrp	x24, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh11:
	ldr	x24, [x24, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
	mov	w25, #1120403456
Lloh12:
	adrp	x19, l_str@PAGE
Lloh13:
	add	x19, x19, l_str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_puts
	mov	x0, x20
	bl	_close_window
	add	w21, w21, #1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	tbnz	w21, #0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #12
	bl	_glfwGetMonitors
	mov	x20, x0
	bl	_rand
	ldr	w8, [sp, #12]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	ldr	x20, [x20, w8, sxtw #3]
	cbz	x20, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_glfwGetVideoMode
	mov	x8, x0
	ldr	w0, [x0]
	ldr	w1, [x8, #4]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, #0
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #640
	mov	w1, #480
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x20
	bl	_open_window
	cbz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	ldr	w0, [x22]
	bl	_glMatrixMode
	fmov	s0, #-1.00000000
	fmov	s1, #1.00000000
	fmov	s2, #-1.00000000
	fmov	s3, #1.00000000
	fmov	s4, #1.00000000
	fmov	s5, #-1.00000000
	bl	_glOrtho
	ldr	w0, [x23]
	bl	_glMatrixMode
	movi	d0, #0000000000000000
	bl	_glfwSetTime
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_glfwGetTime
	fcmp	d0, d8
	b.pl	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	w0, [x24]
	bl	_glClear
	bl	_glPushMatrix
	bl	_glfwGetTime
	fcvt	s0, d0
	fmov	s1, w25
	fmul	s0, s0, s1
	movi	d1, #0000000000000000
	movi	d2, #0000000000000000
	fmov	s3, #1.00000000
	bl	_glRotatef
	fmov	s0, #-0.50000000
	fmov	s1, #-0.50000000
	fmov	s2, #1.00000000
	fmov	s3, #1.00000000
	bl	_glRectf
	bl	_glPopMatrix
	mov	x0, x20
	bl	_glfwSwapBuffers
	bl	_glfwPollEvents
	mov	x0, x20
	bl	_glfwWindowShouldClose
	cbz	x0, LBB0_11
; %bb.13:
	mov	x0, x20
	bl	_close_window
Lloh14:
	adrp	x0, l_str.2@PAGE
Lloh15:
	add	x0, x0, l_str.2@PAGEOFF
	bl	_puts
	bl	_glfwTerminate
Lloh16:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_exit
LBB0_14:
	bl	_glfwTerminate
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_error_callback,4,2             ; @error_callback
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_GL_PROJECTION,4,2              ; @GL_PROJECTION
	.comm	_GL_MODELVIEW,4,2               ; @GL_MODELVIEW
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Closing window"

l_str.2:                                ; @str.2
	.asciz	"User closed window"

.subsections_via_symbols
