xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ serial_init(int, unsigned int);
void serial_initcom1debug(unsigned baudrate) {
  serial_init(((0x03ff0000) + 0xE000), baudrate);
}


x86 assembly (clang, -O0):
<serial_initcom1debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x3ffe000,%edi
call   1030 <serial_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_initcom1debug>:
mov    %edi,%esi
mov    $0x3ffe000,%edi
jmp    1030 <serial_init@plt>

LLVM IR (-O0):
define void @serial_initcom1debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @serial_init(i32 67100672, i32 %3)
ret void
}

LLVM IR (-O2):
define void @serial_initcom1debug(i32 %0) {
%2 = tail call i32 @serial_init(i32 67100672, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, unsigned char);
void *sthread_stack(void *arg) {
  unsigned char stack[1024];
  if (stack[69] != 0)
    errx(1, "stack is %x\n", stack[69]);
  stack[69] = 0x69;
  return NULL;
}


x86 assembly (clang, -O0):
<sthread_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
movzbl -0x3cb(%rbp),%eax
cmp    $0x0,%eax
je     1147 <sthread_stack+0x37>
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
movzbl -0x3cb(%rbp),%edx
call   1030 <errx@plt>
movb   $0x69,-0x3cb(%rbp)
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sthread_stack>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x69,%edx
call   1030 <errx@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"stack is %x\0A\00"
define i8* @sthread_stack(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 69
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 69
%10 = load i8, i8* %9
%11 = call i32 @errx(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext %10)
br label %12
12: ; preds = %8, %1
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 69
store i8 105, i8* %13
ret i8* null
}

LLVM IR (-O2):
@.str = [13 x i8] c"stack is %x\0A\00"
define noalias i8* @sthread_stack(i8* nocapture readnone %0) {
%2 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext 105)
ret i8* null
}
int foo(int u) { return 0; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void returnvpnstatus(int fd) { printf("vpn is running\n"); }


x86 assembly (clang, -O0):
<returnvpnstatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<returnvpnstatus>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"vpn is running\0A\00"
define void @returnvpnstatus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"vpn is running\00"
define void @returnvpnstatus(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int __tzcnt32(unsigned int);
unsigned int test_tzcnt32(unsigned int __X) { return __tzcnt32(__X); }


x86 assembly (clang, -O0):
<test_tzcnt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__tzcnt32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_tzcnt32>:
jmp    1030 <__tzcnt32@plt>

LLVM IR (-O0):
define i32 @test_tzcnt32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__tzcnt32(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_tzcnt32(i32 %0) {
%2 = tail call i32 @__tzcnt32(i32 %0)
ret i32 %2
}
int test4() {
  return ({ ({ 5; }); });
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
mov    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @test4() {
%1 = alloca i32
%2 = alloca i32
store i32 5, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @test4() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("fft_rader_prime_test -- test Rader's prime FFT algorithm, compare to "
         "slow DFT method\n");
  printf("options (default values in []):\n");
  printf("  h     : print usage/help\n");
  printf("  n     : fft size (must be prime and greater than 2)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf44(%rip),%rdi
call   1030 <printf@plt>
lea    0xf54(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
lea    0xf54(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [86 x i8] c"fft_rader_prime_test -- test Rader's prime FFT algorithm, compare to slow DFT method\0A\00"
@.str.1 = [33 x i8] c"options (default values in []):\0A\00"
@.str.2 = [28 x i8] c" h : print usage/help\0A\00"
@.str.3 = [55 x i8] c" n : fft size (must be prime and greater than 2)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [85 x i8] c"fft_rader_prime_test -- test Rader's prime FFT algorithm, compare to slow DFT method\00"
@str.4 = [32 x i8] c"options (default values in []):\00"
@str.5 = [27 x i8] c" h : print usage/help\00"
@str.6 = [54 x i8] c" n : fft size (must be prime and greater than 2)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *malmalloc(size_t size) {
  void *p = malloc(size);
  if (!p) {
    fprintf(stderr, "malloc(%i) returned NULL\n", (int)size);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<malmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <malmalloc+0x49>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
lea    0xe96(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <malmalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"malloc(%i) returned NULL\0A\00"
define i8* @malmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = trunc i64 %10 to i32
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"malloc(%i) returned NULL\0A\00"
define noalias i8* @malmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = trunc i64 %0 to i32
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int glGetError();
int /*<<< orphan*/ printf(char *, int, int);
void CheckError(int line) {
  int n;
  n = glGetError();
  if (n)
    printf("Warning: GL error 0x%x at line %d\n", n, line);
}


x86 assembly (clang, -O0):
<CheckError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <glGetError@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <CheckError+0x31>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckError>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <glGetError@plt>
test   %eax,%eax
je     113f <CheckError+0x1f>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Warning: GL error 0x%x at line %d\0A\00"
define void @CheckError(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @glGetError()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Warning: GL error 0x%x at line %d\0A\00"
define void @CheckError(i32 %0) {
%2 = tail call i32 (...) @glGetError()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void initRandom(unsigned int seed) {
  srand(seed);
  ;
  ;
}


x86 assembly (clang, -O0):
<initRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initRandom>:
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @initRandom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @srand(i32 %3)
ret void
}

LLVM IR (-O2):
define void @initRandom(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Variables and functions */
char *createStringClone(char *);
int /*<<< orphan*/ free(char *);
void handleNewStringSetter(char **oldString, const char *newStr) {
  if (*oldString != NULL) {
    free(*oldString);
  }
  *oldString = createStringClone(newStr == NULL ? " " : newStr);
}


x86 assembly (clang, -O0):
<handleNewStringSetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114a <handleNewStringSetter+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1165 <handleNewStringSetter+0x45>
lea    0xea4(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    116d <handleNewStringSetter+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <createStringClone@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleNewStringSetter>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1137 <handleNewStringSetter+0x17>
call   1030 <free@plt>
test   %rbx,%rbx
lea    0xebf(%rip),%rdi
cmovne %rbx,%rdi
call   1040 <createStringClone@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @handleNewStringSetter(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %4
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %12
br label %18
16: ; preds = %12
%17 = load i8*, i8** %4
br label %18
18: ; preds = %16, %15
%19 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %15 ], [ %17, %16 ]
%20 = call i8* @createStringClone(i8* %19)
%21 = load i8**, i8*** %3
store i8* %20, i8** %21
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @handleNewStringSetter(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %1, null
%9 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %1
%10 = tail call i8* @createStringClone(i8* %9)
store i8* %10, i8** %0
ret void
}
int tail(int q) {}


x86 assembly (clang, -O0):
<tail>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tail>:
ret

LLVM IR (-O0):
define i32 @tail(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @tail(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, ...);
void ASRT_PrintReport(int passed, int failed, double seconds) {
  if (failed == 0) {
    printf("\nALL OK: %d, sec: %.3f\n", passed, seconds);
  } else {
    printf("\nFAIL: %d, PASS: %d, sec: %.3f\n", failed, passed, seconds);
  }
}


x86 assembly (clang, -O0):
<ASRT_PrintReport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1148 <ASRT_PrintReport+0x38>
mov    -0x4(%rbp),%esi
cvttsd2si -0x10(%rbp),%edx
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1161 <ASRT_PrintReport+0x51>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASRT_PrintReport>:
mov    %edi,%eax
test   %esi,%esi
je     1126 <ASRT_PrintReport+0x16>
lea    0xefb(%rip),%rdi
mov    %eax,%edx
mov    $0x1,%al
jmp    1030 <printf@plt>
cvttsd2si %xmm0,%edx
lea    0xecf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0AALL OK: %d, sec: %.3f\0A\00"
@.str.1 = [32 x i8] c"\0AFAIL: %d, PASS: %d, sec: %.3f\0A\00"
define void @ASRT_PrintReport(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %4
%11 = load double, double* %6
%12 = fptosi double %11 to i32
%13 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %12)
br label %19
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = load double, double* %6
%18 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16, double %17)
br label %19
19: ; preds = %14, %9
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0AALL OK: %d, sec: %.3f\0A\00"
@.str.1 = [32 x i8] c"\0AFAIL: %d, PASS: %d, sec: %.3f\0A\00"
define void @ASRT_PrintReport(i32 %0, i32 %1, double %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = fptosi double %2 to i32
%7 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %6)
br label %10
8: ; preds = %3
%9 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %0, double %2)
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Dummy usage: ... \n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Dummy usage: ... \0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Dummy usage: ... \00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void t2() {
  union {
    char a[4];
    int b;
  } x;
  x.b = 0;
  x.a[1] = 1;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "union.c",
          15, 256, x.b);
  ;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movb   $0x1,-0x7(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xed3(%rip),%rdi
mov    $0xf,%esi
mov    $0x100,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
lea    0xee9(%rip),%rdi
mov    $0xf,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%union.anon = type { i32 }
@.str = [138 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/input/8cc/union.c\00"
define void @t2() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i32*
store i32 0, i32* %2
%3 = bitcast %union.anon* %1 to [4 x i8]*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 1, i8* %4
%5 = bitcast %union.anon* %1 to i32*
%6 = load i32, i32* %5
%7 = call i32 @fexpect(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 15, i32 256, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [138 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/input/8cc/union.c\00"
define void @t2() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 15, i32 256, i32 256)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G59_f(char *s) {
  debug("G59_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G59_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G59_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G59_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G59_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G59_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G59_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d) {}


x86 assembly (clang, -O0):
<gpmc_smsc911x_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpmc_smsc911x_init>:
ret

LLVM IR (-O0):
%struct.omap_smsc911x_platform_data = type opaque
define void @gpmc_smsc911x_init(%struct.omap_smsc911x_platform_data* %0) {
%2 = alloca %struct.omap_smsc911x_platform_data*
store %struct.omap_smsc911x_platform_data* %0, %struct.omap_smsc911x_platform_data** %2
ret void
}

LLVM IR (-O2):
%struct.omap_smsc911x_platform_data = type opaque
define void @gpmc_smsc911x_init(%struct.omap_smsc911x_platform_data* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void swap(int64_t **a, int64_t **b) {
  int64_t *tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i32** %0, i32** %1) {
%3 = alloca i32**
%4 = alloca i32**
%5 = alloca i32*
store i32** %0, i32*** %3
store i32** %1, i32*** %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
store i32* %7, i32** %5
%8 = load i32**, i32*** %4
%9 = load i32*, i32** %8
%10 = load i32**, i32*** %3
store i32* %9, i32** %10
%11 = load i32*, i32** %5
%12 = load i32**, i32*** %4
store i32* %11, i32** %12
ret void
}

LLVM IR (-O2):
define void @swap(i32** nocapture %0, i32** nocapture %1) {
%3 = load i32*, i32** %0
%4 = load i32*, i32** %1
store i32* %4, i32** %0
store i32* %3, i32** %1
ret void
}
/* Variables and functions */
char *eatwhite(int /*<<< orphan*/);
int /*<<< orphan*/ eatword(char *);
char *nextword(char *str) { return eatwhite(eatword(str)); }


x86 assembly (clang, -O0):
<nextword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <eatword@plt>
mov    %eax,%edi
call   1040 <eatwhite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextword>:
push   %rax
call   1030 <eatword@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <eatwhite@plt>

LLVM IR (-O0):
define i8* @nextword(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @eatword(i8* %3)
%5 = call i8* @eatwhite(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @nextword(i8* %0) {
%2 = tail call i32 @eatword(i8* %0)
%3 = tail call i8* @eatwhite(i32 %2)
ret i8* %3
}
/* Variables and functions */
double next_guess_nm(double);
double newtons_method(double guess, int num_iters) {
  int i;
  double root = guess;
  for (i = 0; i < num_iters; i++)
    root = next_guess_nm(root);
  return root;
}


x86 assembly (clang, -O0):
<newtons_method>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <newtons_method+0x4a>
movsd  -0x18(%rbp),%xmm0
call   1030 <next_guess_nm@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <newtons_method+0x21>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newtons_method>:
push   %rbx
test   %edi,%edi
jle    112a <newtons_method+0x1a>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
call   1030 <next_guess_nm@plt>
add    $0xffffffff,%ebx
jne    1120 <newtons_method+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define double @newtons_method(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%7 = load double, double* %3
store double %7, double* %6
store i32 0, i32* %5
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load double, double* %6
%14 = call double @next_guess_nm(double %13)
store double %14, double* %6
br label %15
15: ; preds = %12
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %8
18: ; preds = %8
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @newtons_method(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi double [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = tail call double @next_guess_nm(double %5)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi double [ %0, %2 ], [ %7, %4 ]
ret double %11
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _SSIBaseValid(scalar_t__ volatile);
void SSIDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags) {
  ASSERT(_SSIBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x00000024))) &= ~ui32DMAFlags;
}


x86 assembly (clang, -O0):
<SSIDMADisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_SSIBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x24(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDMADisable>:
sub    $0x18,%rsp
mov    %rdi,0x8(%rsp)
mov    %rsi,0x10(%rsp)
mov    0x8(%rsp),%rdi
call   1030 <_SSIBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    0x10(%rsp),%rax
not    %rax
mov    0x8(%rsp),%rcx
and    %rax,0x24(%rcx)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @SSIDMADisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %3
%6 = call i32 @_SSIBaseValid(i64 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load volatile i64, i64* %4
%9 = xor i64 %8, -1
%10 = load volatile i64, i64* %3
%11 = add nsw i64 %10, 36
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, %9
store volatile i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @SSIDMADisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %3
%6 = tail call i32 @_SSIBaseValid(i64 %5)
%7 = tail call i32 @ASSERT(i32 %6)
%8 = load volatile i64, i64* %4
%9 = xor i64 %8, -1
%10 = load volatile i64, i64* %3
%11 = add nsw i64 %10, 36
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, %9
store volatile i64 %14, i64* %12
ret void
}
/* Variables and functions */
int fill_normal_config_req(unsigned char *, int, int, int,
                           int /*<<< orphan*/ *);
int fill_string_info_req(unsigned char *buf) {
  return fill_normal_config_req(buf, 0x8, 0x1, 0x0, NULL);
}


x86 assembly (clang, -O0):
<fill_string_info_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <fill_normal_config_req@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_string_info_req>:
mov    $0x8,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <fill_normal_config_req@plt>

LLVM IR (-O0):
define i32 @fill_string_info_req(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fill_normal_config_req(i8* %3, i32 8, i32 1, i32 0, i32* null)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fill_string_info_req(i8* %0) {
%2 = tail call i32 @fill_normal_config_req(i8* %0, i32 8, i32 1, i32 0, i32* null)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeMemory(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<FreeMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeMemory>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @FreeMemory(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @FreeMemory(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ menu_clear_to_end_of_screen();
int /*<<< orphan*/ menu_set_buffered_input(int);
void menu_reset_console(void) {
  menu_clear_to_end_of_screen();
  menu_set_buffered_input(1);
}


x86 assembly (clang, -O0):
<menu_reset_console>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <menu_clear_to_end_of_screen@plt>
mov    $0x1,%edi
call   1040 <menu_set_buffered_input@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_reset_console>:
push   %rax
xor    %eax,%eax
call   1030 <menu_clear_to_end_of_screen@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <menu_set_buffered_input@plt>

LLVM IR (-O0):
define void @menu_reset_console() {
%1 = call i32 (...) @menu_clear_to_end_of_screen()
%2 = call i32 @menu_set_buffered_input(i32 1)
ret void
}

LLVM IR (-O2):
define void @menu_reset_console() {
%1 = tail call i32 (...) @menu_clear_to_end_of_screen()
%2 = tail call i32 @menu_set_buffered_input(i32 1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void st103_set_tx_count(uint8_t ep_num, uint16_t size) {
  uint16_t *reg_p = (uint16_t *)((0x40006000UL) + (ep_num * 8 + 2) * 2);
  *reg_p = size;
}


x86 assembly (clang, -O0):
<st103_set_tx_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x2,%eax
shl    $0x1,%eax
cltq
add    $0x40006000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<st103_set_tx_count>:
shl    $0x4,%edi
movslq %edi,%rax
mov    %esi,0x40006004(%rax)
ret

LLVM IR (-O0):
define void @st103_set_tx_count(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 8
%8 = add nsw i32 %7, 2
%9 = mul nsw i32 %8, 2
%10 = sext i32 %9 to i64
%11 = add i64 1073766400, %10
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %5
%13 = load i32, i32* %4
%14 = load i32*, i32** %5
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @st103_set_tx_count(i32 %0, i32 %1) {
%3 = shl i32 %0, 4
%4 = or i32 %3, 4
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, 1073766400
%7 = inttoptr i64 %6 to i32*
store i32 %1, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  scanf("%c", &c);
  c = 'z' - (c - 'a');
  printf("\n %c\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x5(%rbp)
lea    0xeac(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
mov    %al,0x7(%rsp)
movsbl %al,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"\0A %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 97
%7 = sub nsw i32 122, %6
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"\0A %c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
store i8 %4, i8* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t PeResolveExportName(uint64_t base, char *function) { return 0; }


x86 assembly (clang, -O0):
<PeResolveExportName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PeResolveExportName>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @PeResolveExportName(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @PeResolveExportName(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101@plt>

LLVM IR (-O0):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_82_ch_97_ch_110_ch_103_ch_101(i8* %0)
ret i32 %2
}
float Ih(float y1, float y2, float x1, float x2, float x) {
  float y;
  y = (y2 * (x - x1) + y1 * (x2 - x)) / (x2 - x1);
  return y;
}


x86 assembly (clang, -O0):
<Ih>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
subss  -0x14(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ih>:
movaps %xmm3,%xmm5
subss  %xmm4,%xmm5
subss  %xmm2,%xmm4
mulss  %xmm5,%xmm0
mulss  %xmm1,%xmm4
addss  %xmm4,%xmm0
subss  %xmm2,%xmm3
divss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @Ih(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%12 = load float, float* %7
%13 = load float, float* %10
%14 = load float, float* %8
%15 = fsub float %13, %14
%16 = load float, float* %6
%17 = load float, float* %9
%18 = load float, float* %10
%19 = fsub float %17, %18
%20 = fmul float %16, %19
%21 = call float @llvm.fmuladd.f32(float %12, float %15, float %20)
%22 = load float, float* %9
%23 = load float, float* %8
%24 = fsub float %22, %23
%25 = fdiv float %21, %24
store float %25, float* %11
%26 = load float, float* %11
ret float %26
}

LLVM IR (-O2):
define float @Ih(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %4, %2
%7 = fsub float %3, %4
%8 = fmul float %7, %0
%9 = tail call float @llvm.fmuladd.f32(float %1, float %6, float %8)
%10 = fsub float %3, %2
%11 = fdiv float %9, %10
ret float %11
}
int feraiseexcept(int excepts) { return excepts == 0 ? 0 : -1; }


x86 assembly (clang, -O0):
<feraiseexcept>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feraiseexcept>:
neg    %edi
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @feraiseexcept(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 -1
ret i32 %6
}

LLVM IR (-O2):
define i32 @feraiseexcept(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = sext i1 %2 to i32
ret i32 %3
}
int bkr_random(int lo, int hi) {
  static int seed = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 + 1;
  static int prime = 2 * 3 * 5 * 7 * 11 * 13 * 17 + 1;
  int value;
  value = lo + (seed >> 3) % (hi - lo + 1);
  seed *= prime;
  seed = seed < 0 ? -seed : seed;
  return value;
}


x86 assembly (clang, -O0):
<bkr_random>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2f0a(%rip),%eax
sar    $0x3,%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    0x2ef1(%rip),%eax
imul   0x2ee6(%rip),%eax
mov    %eax,0x2ee0(%rip)
cmpl   $0x0,0x2ed9(%rip)
jge    115d <bkr_random+0x5d>
xor    %eax,%eax
sub    0x2ecb(%rip),%eax
mov    %eax,-0x14(%rbp)
jmp    1166 <bkr_random+0x66>
mov    0x2ebd(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,0x2eb1(%rip)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkr_random>:
mov    0x2f1a(%rip),%eax
imul   $0x7ca2f,%eax,%ecx
sar    $0x3,%eax
sub    %edi,%esi
add    $0x1,%esi
cltd
idiv   %esi
lea    (%rdx,%rdi,1),%eax
mov    %ecx,%edx
neg    %edx
cmovs  %ecx,%edx
mov    %edx,0x2ef9(%rip)
ret

LLVM IR (-O0):
@bkr_random.seed = internal global i32 9699691
@bkr_random.prime = internal global i32 510511
define i32 @bkr_random(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* @bkr_random.seed
%8 = ashr i32 %7, 3
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = add nsw i32 %11, 1
%13 = srem i32 %8, %12
%14 = add nsw i32 %6, %13
store i32 %14, i32* %5
%15 = load i32, i32* @bkr_random.prime
%16 = load i32, i32* @bkr_random.seed
%17 = mul nsw i32 %16, %15
store i32 %17, i32* @bkr_random.seed
%18 = load i32, i32* @bkr_random.seed
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %2
%21 = load i32, i32* @bkr_random.seed
%22 = sub nsw i32 0, %21
br label %25
23: ; preds = %2
%24 = load i32, i32* @bkr_random.seed
br label %25
25: ; preds = %23, %20
%26 = phi i32 [ %22, %20 ], [ %24, %23 ]
store i32 %26, i32* @bkr_random.seed
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
@bkr_random.seed = internal unnamed_addr global i32 9699691
define i32 @bkr_random(i32 %0, i32 %1) {
%3 = load i32, i32* @bkr_random.seed
%4 = ashr i32 %3, 3
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = srem i32 %4, %6
%8 = add nsw i32 %7, %0
%9 = mul nsw i32 %3, 510511
%10 = tail call i32 @llvm.abs.i32(i32 %9, i1 true)
store i32 %10, i32* @bkr_random.seed
ret i32 %8
}
/* Type definitions */
struct subedge {
  int dummy;
};

/* Variables and functions */
scalar_t__ error();
int /*<<< orphan*/ free_object(int, short *);
void free_subedge(struct subedge *sed) {
  free_object(52, (short *)sed);
  if (error())
    return;
}


x86 assembly (clang, -O0):
<free_subedge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x34,%edi
call   1030 <free_object@plt>
mov    $0x0,%al
call   1040 <error@plt>
cmp    $0x0,%rax
je     1150 <free_subedge+0x30>
jmp    1150 <free_subedge+0x30>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_subedge>:
push   %rax
mov    %rdi,%rsi
mov    $0x34,%edi
call   1030 <free_object@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <error@plt>

LLVM IR (-O0):
%struct.subedge = type { i32 }
define void @free_subedge(%struct.subedge* %0) {
%2 = alloca %struct.subedge*
store %struct.subedge* %0, %struct.subedge** %2
%3 = load %struct.subedge*, %struct.subedge** %2
%4 = bitcast %struct.subedge* %3 to i16*
%5 = call i32 @free_object(i32 52, i16* %4)
%6 = call i64 (...) @error()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.subedge = type { i32 }
define void @free_subedge(%struct.subedge* %0) {
%2 = bitcast %struct.subedge* %0 to i16*
%3 = tail call i32 @free_object(i32 52, i16* %2)
%4 = tail call i64 (...) @error()
ret void
}
/* Variables and functions */
scalar_t__ test(int);
void foo() {
  int i;
  for (i = 0; i < 10; ++i) {
#pragma omp sections
    { continue; }
  }
#pragma omp sections
  {
#pragma omp section
    {
    bad1:;
    }
#pragma omp section
    goto bad1;
  }
#pragma omp sections
  { goto bad2; }
bad2:;
  goto bad3;
#pragma omp sections
  {
  bad3:;
  }
#pragma omp sections
  {
    goto ok1;
  ok1:;
#pragma omp section
    for (i = 0; i < 10; ++i)
      if (test(i))
        break;
      else
        continue;
#pragma omp section
    switch (i) {
    case 0:
      break;
    default:
      test(i);
    }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1128 <foo+0x28>
jmp    111a <foo+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
jmp    112d <foo+0x2d>
jmp    112d <foo+0x2d>

x86 assembly (clang, -O2):
<foo>:
jmp    1100 <foo>

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
br label %10
10: ; preds = %10, %9
br label %10
11: ; No predecessors!
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
store i32 0, i32* %1
br label %14
14: ; preds = %23, %13
%15 = load i32, i32* %1
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %26
17: ; preds = %14
%18 = load i32, i32* %1
%19 = call i64 @test(i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
br label %26
22: ; preds = %17
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %14
26: ; preds = %21, %14
%27 = load i32, i32* %1
switch i32 %27, label %29 [
i32 0, label %28
]
28: ; preds = %26
br label %32
29: ; preds = %26
%30 = load i32, i32* %1
%31 = call i64 @test(i32 %30)
br label %32
32: ; preds = %29, %28
ret void
}

LLVM IR (-O2):
define void @foo() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
double log(double);
double ml_log(double x) { return log(x); }


x86 assembly (clang, -O0):
<ml_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ml_log>:
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @ml_log(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
ret double %4
}

LLVM IR (-O2):
define double @ml_log(double %0) {
%2 = tail call double @log(double %0)
ret double %2
}