// File: /workspace/github_c_makefile_star2_O0/System-Glitch[P]ESGILinter-C/src/test.c
// Function: test_parsing_operations
static void test_parsing_operations() {
	
	printf("------------------------------%s\n", FORMAT_RESET);
	printf("%sTESTING PARSE OPERATION%s\n", COLOR_GREEN_BOLD, FORMAT_RESET);

	arraylist_t *file = arraylist_init(ARRAYLIST_DEFAULT_CAPACITY);
	arraylist_add(file, strduplicate("static int glob = 89;"));
	arraylist_add(file, strduplicate("static int a = 97;"));
	arraylist_add(file, strduplicate("static int **d;"));
	arraylist_add(file, strduplicate("static unsigned char b = 98;"));
	arraylist_add(file, strduplicate("static unsigned char ***ptr;"));
	arraylist_add(file, strduplicate("int *ptr1;"));
	arraylist_add(file, strduplicate("int *ptr2;"));
	arraylist_add(file, strduplicate("char* test2(char v) {"));
	arraylist_add(file, strduplicate("\tv = glob;"));
	arraylist_add(file, strduplicate("}"));

	scope_t *scope = parse_root_scope(file);

	test_operation("int i = 0;", 9, scope);
	test_operation("a + b", 9, scope);
	test_operation("b + a", 9, scope);
	test_operation("ab += ba", 9, scope);
	test_operation("a << b", 9, scope);
	test_operation("a <<= ba + ca", 9, scope);
	test_operation("a * b", 9, scope);
	test_operation("a * *ptr", 9, scope);
	test_operation("*ptr * a", 9, scope);
	test_operation("a & &ptr", 9, scope);
	test_operation("&ptr & a", 9, scope);
	test_operation("***ptr * **d", 9, scope);
	test_operation("***ptr***d", 9, scope);
	test_operation("*&&ptr**&d", 9, scope);
	test_operation("*&ptr**&d", 9, scope);
	test_operation("a *", 9, scope);
	test_operation("a <<= b < c << e;", 9, scope);
	test_operation("a <<< b", 9, scope);
	test_operation("test(e) + 12.8646f;", 8, scope);
	test_operation("a = b + test(e) + 12.8646f;", 8, scope);
	test_operation("1 / 2f", 9, scope);
	test_operation("/* comment */ 1 / 2f", 9, scope);
	test_operation("/* comment */ 1 / 2f /*comment*/", 9, scope);
	test_operation("//comment\n1d + 3", 9, scope);
	test_operation("1d //comment\n * 3", 9, scope);
	test_operation("1d * 3", 9, scope);
	test_operation("ptr1 + ptr2", 9, scope);
	test_operation("ptr1 + 1", 9, scope);
	test_operation("ptr1 - 1", 9, scope);
	test_operation("1 - ptr1", 9, scope);
	test_operation("1 + ptr1", 9, scope);
	test_operation("ptr1 - ptr2", 9, scope);
	test_operation("b < 88.0", 9, scope);
	test_operation("b <= 88.0", 9, scope);
	test_operation("b >= 88.0", 9, scope);
	test_operation("b == 88.0", 9, scope);
	test_operation("b != 88.0", 9, scope);
	test_operation("b ! 88.0", 9, scope);
	test_operation("!*&b", 9, scope);
	test_operation("\"a+b\" + 4", 9, scope);

	test_operation("double c = e, d, f = g + 4;", 9, scope);
	test_operation("c = a = d = e = a + 4;", 9, scope);

	test_operation("(a + b)", 9, scope);
	test_operation("(a + b + 4.5)", 9, scope);
	test_operation("a + (b - c)", 9, scope);
	test_operation("a + (b - 4.0)", 9, scope);
	test_operation("(a + (b - 4))", 9, scope);
	test_operation("(a + b) - 4", 9, scope);
	test_operation("((a + b)) - 4", 9, scope);
	test_operation("((((a + b)))) - 4", 9, scope);
	test_operation("(a + b) - (4.2)", 9, scope);
	test_operation("(b) * 5", 9, scope);
	test_operation("int c = (a + b)", 9, scope);
	test_operation("(int c = 4)", 9, scope);
	test_operation("int c = (((((k)))));", 9, scope);
	test_operation("int c = (k);", 9, scope);
	test_operation("int c = (k;", 9, scope);
	test_operation("int c = k);", 9, scope);
	test_operation("int c = k, f = (az), g;", 9, scope);
	test_operation("( ( (b) * 5 ) / 6.5 )", 9, scope);
	test_operation("( ( (b) * 5 ) / ( (4 + 2.5) + 5 ) )", 9, scope);

	test_operation("condition ? left : right", 9, scope);
	test_operation("condition ? \"ab\" : d", 9, scope);
	test_operation("condition ? \"a:b\" : d", 9, scope);
	test_operation("1 ? a : 4", 9, scope);
	test_operation("condition ? condition2 ? a : b : d", 9, scope);
	test_operation("condition ? (condition2 ? a : b) : d", 9, scope);
	test_operation("(condition2 ? a : b) ? a : b", 9, scope);
	test_operation("(condition2 ? a : 4) ? (char*)(((a + 5))) : (test2(a < 5 ? (char)0 : (char)5))", 9, scope);
	test_operation("a + condition ? 4 : 5", 9, scope);
	test_operation("a + (condition ? 4 : 5)", 9, scope);
	test_operation("int k = condition ? 4.5 : 5.5", 9, scope);
	test_operation("int k = (condition ? 4.5 : 5.5)", 9, scope);

	scope_free(scope);
	arraylist_free(file, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0xe0e2(%rip), %rdi      # 0x13031
leaq 0xe0cf(%rip), %rsi      # 0x13025
movb $0x0, %al
callq 0x20b0
leaq 0xed8f(%rip), %rdi      # 0x13cf3
leaq 0xe110(%rip), %rsi      # 0x1307b
leaq 0xe0b3(%rip), %rdx      # 0x13025
movb $0x0, %al
callq 0x20b0
movl $0xa, %edi
callq 0x8580
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0xe6f4(%rip), %rdi      # 0x1368a
callq 0xa550
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0xed5a(%rip), %rdi      # 0x13d10
callq 0xa550
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0xed4d(%rip), %rdi      # 0x13d23
callq 0xa550
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xe36c(%rip), %rdi      # 0x13362
callq 0xa550
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0xed1d(%rip), %rdi      # 0x13d33
callq 0xa550
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0xed1a(%rip), %rdi      # 0x13d50
callq 0xa550
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0xed05(%rip), %rdi      # 0x13d5b
callq 0xa550
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0xe90b(%rip), %rdi      # 0x13981
callq 0xa550
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xecd0(%rip), %rdi      # 0x13d66
callq 0xa550
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0xf3f3(%rip), %rdi      # 0x144a9
callq 0xa550
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x8730
movq -0x8(%rbp), %rdi
callq 0x77a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
leaq 0xec92(%rip), %rdi      # 0x13d71
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec88(%rip), %rdi      # 0x13d7c
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec79(%rip), %rdi      # 0x13d82
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec6a(%rip), %rdi      # 0x13d88
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec5e(%rip), %rdi      # 0x13d91
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec50(%rip), %rdi      # 0x13d98
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec49(%rip), %rdi      # 0x13da6
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec3a(%rip), %rdi      # 0x13dac
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec2e(%rip), %rdi      # 0x13db5
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec22(%rip), %rdi      # 0x13dbe
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec16(%rip), %rdi      # 0x13dc7
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec0a(%rip), %rdi      # 0x13dd0
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xec02(%rip), %rdi      # 0x13ddd
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebf8(%rip), %rdi      # 0x13de8
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebee(%rip), %rdi      # 0x13df3
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebe3(%rip), %rdi      # 0x13dfd
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebd2(%rip), %rdi      # 0x13e01
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebcf(%rip), %rdi      # 0x13e13
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebca(%rip), %rdi      # 0x13e23
movl $0x8, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebad(%rip), %rdi      # 0x13e1b
movl $0x8, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebc2(%rip), %rdi      # 0x13e45
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb9f(%rip), %rdi      # 0x13e37
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb9f(%rip), %rdi      # 0x13e4c
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xebab(%rip), %rdi      # 0x13e6d
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeba7(%rip), %rdi      # 0x13e7e
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeba4(%rip), %rdi      # 0x13e90
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb96(%rip), %rdi      # 0x13e97
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb8d(%rip), %rdi      # 0x13ea3
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb81(%rip), %rdi      # 0x13eac
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb75(%rip), %rdi      # 0x13eb5
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb69(%rip), %rdi      # 0x13ebe
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb5d(%rip), %rdi      # 0x13ec7
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb54(%rip), %rdi      # 0x13ed3
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb48(%rip), %rdi      # 0x13edc
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb3d(%rip), %rdi      # 0x13ee6
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb32(%rip), %rdi      # 0x13ef0
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb27(%rip), %rdi      # 0x13efa
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb1c(%rip), %rdi      # 0x13f04
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xe84c(%rip), %rdi      # 0x13c49
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeafb(%rip), %rdi      # 0x13f0d
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaf0(%rip), %rdi      # 0x13f17
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaf7(%rip), %rdi      # 0x13f33
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeb7b(%rip), %rdi      # 0x13fcc
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeae4(%rip), %rdi      # 0x13f4a
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeadd(%rip), %rdi      # 0x13f58
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xead4(%rip), %rdi      # 0x13f64
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeacd(%rip), %rdi      # 0x13f72
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeac6(%rip), %rdi      # 0x13f80
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeabd(%rip), %rdi      # 0x13f8c
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeab6(%rip), %rdi      # 0x13f9a
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeab3(%rip), %rdi      # 0x13fac
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaae(%rip), %rdi      # 0x13fbc
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaa1(%rip), %rdi      # 0x13fc4
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea9c(%rip), %rdi      # 0x13fd4
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea93(%rip), %rdi      # 0x13fe0
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea93(%rip), %rdi      # 0x13ff5
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea8b(%rip), %rdi      # 0x14002
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea82(%rip), %rdi      # 0x1400e
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea79(%rip), %rdi      # 0x1401a
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea7c(%rip), %rdi      # 0x14032
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea7d(%rip), %rdi      # 0x14048
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea8c(%rip), %rdi      # 0x1406c
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea90(%rip), %rdi      # 0x14085
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea90(%rip), %rdi      # 0x1409a
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea91(%rip), %rdi      # 0x140b0
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea86(%rip), %rdi      # 0x140ba
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xea94(%rip), %rdi      # 0x140dd
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaa4(%rip), %rdi      # 0x14102
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaac(%rip), %rdi      # 0x1411f
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeae6(%rip), %rdi      # 0x1416e
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeae7(%rip), %rdi      # 0x14184
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaea(%rip), %rdi      # 0x1419c
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdx
leaq 0xeaf3(%rip), %rdi      # 0x141ba
movl $0x9, %esi
callq 0x56f0
movq -0x10(%rbp), %rdi
callq 0x7fa0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x8a00
addq $0x60, %rsp
popq %rbp
retq
nop