#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void test_goto() {
  int acc = 0;
  goto x;
  acc = 5;
x:
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          204, 0, acc);
  ;
  int i = 0;
  acc = 0;
y:
  if (i > 10)
    goto z;
  acc += i++;
  goto y;
z:
  if (i > 11)
    goto a;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          212, 55, acc);
  ;
  i++;
  goto y;
a:;
}


x86 assembly (clang, -O0):
<test_goto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xed7(%rip),%rdi
mov    $0xcc,%esi
xor    %edx,%edx
call   1030 <fexpect@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x8(%rbp)
jle    1152 <test_goto+0x42>
jmp    1168 <test_goto+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <test_goto+0x33>
cmpl   $0xb,-0x8(%rbp)
jle    1177 <test_goto+0x67>
jmp    119e <test_goto+0x8e>
mov    -0x4(%rbp),%ecx
lea    0xe7f(%rip),%rdi
mov    $0xd4,%esi
mov    $0x37,%edx
call   1030 <fexpect@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <test_goto+0x33>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_goto>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xcc,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0xd4,%esi
mov    $0x37,%edx
mov    $0x37,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_goto() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0
%4 = load i32, i32* %1
%5 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 204, i32 0, i32 %4)
store i32 0, i32* %2
store i32 0, i32* %1
br label %6
6: ; preds = %19, %10, %3
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %6
br label %15
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
%13 = load i32, i32* %1
%14 = add nsw i32 %13, %11
store i32 %14, i32* %1
br label %6
15: ; preds = %9
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 11
br i1 %17, label %18, label %19
18: ; preds = %15
br label %24
19: ; preds = %15
%20 = load i32, i32* %1
%21 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 212, i32 55, i32 %20)
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %6
24: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_goto() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 204, i32 0, i32 0)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 212, i32 55, i32 55)
ret void
}