xunge/DecIR huggingface dataset:
void overflow_2() {
  char buf_1[100];
  char buf_2[80];
  int i;
  for (i = 0; i < 120; ++i) {
    buf_1[i + 2] = 'a';
  }
  for (i = 0; i < 80; i += 2) {
    buf_2[i] = 'b';
  }
}


x86 assembly (clang, -O0):
<overflow_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0xc4(%rbp)
cmpl   $0x78,-0xc4(%rbp)
jge    1143 <overflow_2+0x43>
mov    -0xc4(%rbp),%eax
add    $0x2,%eax
cltq
movb   $0x61,-0x70(%rbp,%rax,1)
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1112 <overflow_2+0x12>
movl   $0x0,-0xc4(%rbp)
cmpl   $0x50,-0xc4(%rbp)
jge    117d <overflow_2+0x7d>
movslq -0xc4(%rbp),%rax
movb   $0x62,-0xc0(%rbp,%rax,1)
62
mov    -0xc4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc4(%rbp)
jmp    114d <overflow_2+0x4d>
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @overflow_2() {
%1 = alloca [100 x i8]
%2 = alloca [80 x i8]
%3 = alloca i32
store i32 0, i32* %3
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 120
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %10
store i8 97, i8* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
store i32 0, i32* %3
br label %16
16: ; preds = %23, %15
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 80
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %21
store i8 98, i8* %22
br label %23
23: ; preds = %19
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 2
store i32 %25, i32* %3
br label %16
26: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @overflow_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
signed int puts(const char *pStr) {
  signed int i = fputs(pStr, stdout);
  fputc('\n', stdout);
  return i + 1;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    %eax,%ebx
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputc(i8 signext 10, i32 %7)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
ret i32 %10
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = add nsw i32 %3, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("Program to convert ASCII file into lower format\n"
         "\t-h|--help for help\n"
         "\t-v|--version for version information\n"
         "\t-l|--lower convert into lowercase\n"
         "\t-u|--upper convert into uppercase\n");
}


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

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

LLVM IR (-O0):
@.str = [177 x i8] c"Program to convert ASCII file into lower format\0A\09-h|--help for help\0A\09-v|--version for version information\0A\09-l|--lower convert into lowercase\0A\09-u|--upper convert into uppercase\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [176 x i8] c"Program to convert ASCII file into lower format\0A\09-h|--help for help\0A\09-v|--version for version information\0A\09-l|--lower convert into lowercase\0A\09-u|--upper convert into uppercase\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([176 x i8], [176 x i8]* @str, i64 0, i64 0))
ret void
}
int lws_plat_pipe_create(struct lws *wsi) { return 1; }


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

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

LLVM IR (-O0):
%struct.lws = type opaque
define i32 @lws_plat_pipe_create(%struct.lws* %0) {
%2 = alloca %struct.lws*
store %struct.lws* %0, %struct.lws** %2
ret i32 1
}

LLVM IR (-O2):
%struct.lws = type opaque
define i32 @lws_plat_pipe_create(%struct.lws* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ Pixmap;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
int SetPixmapDataToAttribute(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/,
                             int /*<<< orphan*/, char *);
int XNVCTRLSetScanoutIntensity(Display *xDpy, int screenId, int nvDpyId,
                               Pixmap intensityPixmap, Bool blendAfterWarp) {
  return SetPixmapDataToAttribute(xDpy, screenId, nvDpyId, intensityPixmap,
                                  blendAfterWarp, "BlendTexture");
}


x86 assembly (clang, -O0):
<XNVCTRLSetScanoutIntensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xebf(%rip),%r9
call   1030 <SetPixmapDataToAttribute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XNVCTRLSetScanoutIntensity>:
lea    0xee9(%rip),%r9
jmp    1030 <SetPixmapDataToAttribute@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"BlendTexture\00"
define i32 @XNVCTRLSetScanoutIntensity(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @SetPixmapDataToAttribute(i32* %11, i32 %12, i32 %13, i32 %14, i32 %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %16
}

LLVM IR (-O2):
@.str = [13 x i8] c"BlendTexture\00"
define i32 @XNVCTRLSetScanoutIntensity(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @SetPixmapDataToAttribute(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void Version(void) {
  printf("tMon client, version %s%s\n", "0.4", ".3");
  exit(0);
}


x86 assembly (clang, -O0):
<Version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xee6(%rip),%rdx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeec(%rip),%rsi
lea    0xee9(%rip),%rdx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"tMon client, version %s%s\0A\00"
@.str.1 = [4 x i8] c"0.4\00"
@.str.2 = [3 x i8] c".3\00"
define void @Version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"tMon client, version %s%s\0A\00"
@.str.1 = [4 x i8] c"0.4\00"
@.str.2 = [3 x i8] c".3\00"
define void @Version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int h, p;
  float divisao;
  scanf("%d%d", &h, &p);
  divisao = (float)h / p;
  printf("%.2f\n", divisao);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xea3(%rip),%rdi
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    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cvtsi2ssl 0x4(%rsp),%xmm0
cvtsi2ssl (%rsp),%xmm1
divss  %xmm1,%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
%10 = fdiv float %7, %9
store float %10, float* %4
%11 = load float, float* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to float
%10 = fdiv float %7, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_SubtractMat4_init(void) {
  _hmt_register_covercase("HMM_SubtractMat4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_SubtractMat4_init>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HMM_SubtractMat4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SubtractMat4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HMM_SubtractMat4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SubtractMat4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int totalPaths(int, int);
int main() {
  int m, n;
  scanf("%d", &m);
  scanf("%d", &n);
  printf("The total paths are %d", totalPaths(m, n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <totalPaths@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <totalPaths@plt>
lea    0xe96(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [23 x i8] c"The total paths are %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @totalPaths(i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [23 x i8] c"The total paths are %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @totalPaths(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ execve(char *, char *const *, char **);
int main(int argc, char **argv, char **envp) {
  char *null_filename = NULL;
  char *const argv_exe[] = {"true", NULL};
  execve(null_filename, NULL, NULL);
  execve("../../tests/true", argv_exe, envp);
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2cce(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2ccb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <execve@plt>
lea    -0x30(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe90(%rip),%rdi
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movaps 0x2ce1(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <execve@plt>
lea    0xebb(%rip),%rdi
mov    %rsp,%rsi
mov    %rbx,%rdx
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@__const.main.argv_exe = [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [17 x i8] c"../../tests/true\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca [2 x i8*]
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
store i8* null, i8** %7
%9 = bitcast [2 x i8*]* %8 to i8*
%10 = load i8*, i8** %7
%11 = call i32 @execve(i8* %10, i8** null, i8** null)
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %8, i64 0, i64 0
%13 = load i8**, i8*** %6
%14 = call i32 @execve(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %12, i8** %13)
%15 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@__const.main.argv_exe = [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [17 x i8] c"../../tests/true\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** %2) {
%4 = alloca [2 x i8*]
%5 = bitcast [2 x i8*]* %4 to i8*
%6 = tail call i32 @execve(i8* null, i8** null, i8** null)
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%8 = call i32 @execve(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %7, i8** %2)
%9 = call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
struct byz {
  int dummy;
};

/* Variables and functions */
struct byz *byz_new(size_t, int);
struct byz *byz_new_nolimit(size_t init_len) {
  return byz_new(init_len, -1);
}


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

x86 assembly (clang, -O2):
<byz_new_nolimit>:
mov    $0xffffffff,%esi
jmp    1030 <byz_new@plt>

LLVM IR (-O0):
%struct.byz = type { i32 }
define %struct.byz* @byz_new_nolimit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call %struct.byz* @byz_new(i64 %3, i32 -1)
ret %struct.byz* %4
}

LLVM IR (-O2):
%struct.byz = type { i32 }
define %struct.byz* @byz_new_nolimit(i64 %0) {
%2 = tail call %struct.byz* @byz_new(i64 %0, i32 -1)
ret %struct.byz* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("1\n101\n1001\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"1\0A101\0A1001\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"1\0A101\0A1001\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ send_safe(int /*<<< orphan*/, char *, int);
ssize_t send_status_safe(int32_t sock, int32_t status) {
  char buffer[] = {0, '0' + status, 0};
  return send_safe(sock, buffer, 3);
}


x86 assembly (clang, -O0):
<send_status_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movb   $0x0,-0xb(%rbp)
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xb(%rbp),%rsi
mov    $0x3,%edx
call   1030 <send_safe@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_status_safe>:
push   %rax
movb   $0x0,0x5(%rsp)
add    $0x30,%sil
mov    %sil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x5(%rsp),%rsi
mov    $0x3,%edx
call   1030 <send_safe@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @send_status_safe(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [3 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
store i8 0, i8* %6
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i32, i32* %4
%9 = add nsw i32 48, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %7
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %11
%12 = load i32, i32* %3
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%14 = call i32 @send_safe(i32 %12, i8* %13, i32 3)
ret i32 %14
}

LLVM IR (-O2):
define i32 @send_status_safe(i32 %0, i32 %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
%6 = trunc i32 %1 to i8
%7 = add i8 %6, 48
store i8 %7, i8* %5
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %8
%9 = call i32 @send_safe(i32 %0, i8* %4, i32 3)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, void *);
char *strdup(char *);
char *get_name(void *addr) {
  char buf[20];
  sprintf(buf, "%p", addr);
  return strdup(buf);
}


x86 assembly (clang, -O0):
<get_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_name>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rdx
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%p\00"
define i8* @get_name(i8* %0) {
%2 = alloca i8*
%3 = alloca [20 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = call i8* @strdup(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define noalias i8* @get_name(i8* %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}
double Int(double (*f)(double), double a) { return (*f)(a); }


x86 assembly (clang, -O0):
<Int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int>:
jmp    *%rdi

LLVM IR (-O0):
define double @Int(double (double)* %0, double %1) {
%3 = alloca double (double)*
%4 = alloca double
store double (double)* %0, double (double)** %3
store double %1, double* %4
%5 = load double (double)*, double (double)** %3
%6 = load double, double* %4
%7 = call double %5(double %6)
ret double %7
}

LLVM IR (-O2):
define double @Int(double (double)* nocapture %0, double %1) {
%3 = tail call double %0(double %1)
ret double %3
}
/* Variables and functions */
long bar1(long);
int /*<<< orphan*/ dummy1(long *);
void foo1(long a, long b) {
  long array[128];
  long *c = array;
  for (b = 0; b < a; b++)
    c[b] = bar1(c[b]);
  dummy1(c);
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    118e <foo1+0x6e>
mov    -0x418(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <bar1@plt>
mov    %rax,%rdx
mov    -0x418(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1149 <foo1+0x29>
mov    -0x418(%rbp),%rdi
call   1030 <dummy1@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
sub    $0x408,%rsp
mov    %rsp,%rdi
call   1030 <dummy1@plt>
add    $0x408,%rsp
ret

LLVM IR (-O0):
define void @foo1(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca [128 x i64]
%6 = alloca i64*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = getelementptr inbounds [128 x i64], [128 x i64]* %5, i64 0, i64 0
store i64* %7, i64** %6
store i64 0, i64* %4
br label %8
8: ; preds = %21, %2
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i64*, i64** %6
%14 = load i64, i64* %4
%15 = getelementptr inbounds i64, i64* %13, i64 %14
%16 = load i64, i64* %15
%17 = call i64 @bar1(i64 %16)
%18 = load i64*, i64** %6
%19 = load i64, i64* %4
%20 = getelementptr inbounds i64, i64* %18, i64 %19
store i64 %17, i64* %20
br label %21
21: ; preds = %12
%22 = load i64, i64* %4
%23 = add nsw i64 %22, 1
store i64 %23, i64* %4
br label %8
24: ; preds = %8
%25 = load i64*, i64** %6
%26 = call i32 @dummy1(i64* %25)
ret void
}

LLVM IR (-O2):
define void @foo1(i64 %0, i64 %1) {
%3 = alloca [128 x i64]
%4 = bitcast [128 x i64]* %3 to i8*
%5 = icmp slt i64 %0, 1
%6 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 0
%7 = call i32 @dummy1(i64* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syssuerr(char *, char *);
int unlink(char *);
int eunlink(char *path) {
  int returnmode;
  if (-1 == (returnmode = unlink(path)))
    syssuerr("%s: eunlink: unlink failed",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/"
             "trip/iwave/sucore/src/syscalls.c");
  return returnmode;
}


x86 assembly (clang, -O0):
<eunlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    115a <eunlink+0x3a>
lea    0xeb2(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <syssuerr@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eunlink>:
push   %rbx
call   1030 <unlink@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1140 <eunlink+0x20>
lea    0xecc(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1040 <syssuerr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"%s: eunlink: unlink failed\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/trip/iwave/sucore/src/syscalls.c\00"
define i32 @eunlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @unlink(i8* %4)
store i32 %5, i32* %3
%6 = icmp eq i32 -1, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @syssuerr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s: eunlink: unlink failed\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/trip/iwave/sucore/src/syscalls.c\00"
define i32 @eunlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @syssuerr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int pgn_error(const char *s) {
  fprintf(stderr, "Error: %s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<pgn_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgn_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define i32 @pgn_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define i32 @pgn_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
int do_968() { return 968; }


x86 assembly (clang, -O0):
<do_968>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_968() {
ret i32 968
}

LLVM IR (-O2):
define i32 @do_968() {
ret i32 968
}
int ismetachar(char c) {
  return ((c == 's') || (c == 'S') || (c == 'w') || (c == 'W') || (c == 'd') ||
          (c == 'D'));
}


x86 assembly (clang, -O0):
<ismetachar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x73,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ismetachar+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x53,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ismetachar+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x77,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ismetachar+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x57,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ismetachar+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x64,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ismetachar+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x44,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ismetachar>:
lea    -0x53(%rdi),%ecx
cmp    $0x24,%cl
ja     1121 <ismetachar+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x1100020011,%rdx
bt     %rcx,%rdx
jae    1121 <ismetachar+0x21>
ret
xor    %eax,%eax
cmp    $0x44,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ismetachar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 115
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 83
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 119
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 87
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 100
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 68
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @ismetachar(i8 signext %0) {
switch i8 %0, label %2 [
i8 119, label %5
i8 115, label %5
i8 100, label %5
i8 87, label %5
i8 83, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 68
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t read8le(uint8_t *src) { return *src; }


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

x86 assembly (clang, -O2):
<read8le>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read8le(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *GetConfigValue(char const *, char const *, char *);
int ConfigValueExists(const char *blockName, const char *keyName) {
  const char *val = GetConfigValue(blockName, keyName, "");
  return !!val[0];
}


x86 assembly (clang, -O0):
<ConfigValueExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <GetConfigValue@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConfigValueExists>:
push   %rax
lea    0xee8(%rip),%rdx
call   1030 <GetConfigValue@plt>
xor    %ecx,%ecx
cmpb   $0x0,(%rax)
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueExists(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @GetConfigValue(i8* %6, i8* %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
%13 = xor i1 %12, true
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueExists(i8* %0, i8* %1) {
%3 = tail call i8* @GetConfigValue(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int main(void) {
  int *p;
  {
    int x;
    p = &x;
  }
  *p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_9Fint32_reg(int val) { return ((val) & (0x9F << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_9Fint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x9f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Fint32_reg>:
test   $0x9f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Fint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 159
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_9Fint32_reg(i32 %0) {
%2 = and i32 %0, 159
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int CmpDate(month1, day1, month2, day2)
int month1, day1, month2, day2;
{
  if (month1 != month2)
    return (month1 - month2);
  if (day1 != day2)
    return (day1 - day2);
  return (0);
}


x86 assembly (clang, -O0):
<CmpDate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     112a <CmpDate+0x2a>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <CmpDate+0x4b>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1144 <CmpDate+0x44>
mov    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <CmpDate+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmpDate>:
xor    %eax,%eax
sub    %ecx,%esi
cmovne %esi,%eax
sub    %edx,%edi
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @CmpDate(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i32, i32* %8
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %4
%14 = load i32, i32* %6
%15 = load i32, i32* %8
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %5
br label %26
17: ; preds = %4
%18 = load i32, i32* %7
%19 = load i32, i32* %9
%20 = icmp ne i32 %18, %19
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i32, i32* %7
%23 = load i32, i32* %9
%24 = sub nsw i32 %22, %23
store i32 %24, i32* %5
br label %26
25: ; preds = %17
store i32 0, i32* %5
br label %26
26: ; preds = %25, %21, %13
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @CmpDate(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %2
%6 = sub nsw i32 %0, %2
%7 = icmp eq i32 %1, %3
%8 = sub nsw i32 %1, %3
%9 = select i1 %7, i32 0, i32 %8
%10 = select i1 %5, i32 %9, i32 %6
ret i32 %10
}
int islower(int c) { return (c >= 0x61 && c <= 0x7A) ? 1 : 0; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_RED_LED_OUTPUT() { set_io_bit(0x36, 2); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RED_LED_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
mov    $0x2,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RED_LED_OUTPUT>:
mov    $0x36,%edi
mov    $0x2,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RED_LED_OUTPUT() {
%1 = call i32 @set_io_bit(i32 54, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RED_LED_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 54, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mainloop_poll() {
  printf("NOT IMPLEMENTED:"
         "pa_mainloop_poll"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_mainloop_poll\0A\00"
define i32 @pa_mainloop_poll() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_mainloop_poll\00"
define i32 @pa_mainloop_poll() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ default_parser(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, char *);
void test_pass(char *a) {
  printf("%s", "    ");
  default_parser(0, "Ok  ");
  printf(": [ %s ]\n", a);
}


x86 assembly (clang, -O0):
<test_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
lea    0xec0(%rip),%rsi
call   1040 <default_parser@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_pass>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <printf@plt>
lea    0xeca(%rip),%rsi
xor    %edi,%edi
call   1040 <default_parser@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" \00"
@.str.2 = [5 x i8] c"Ok \00"
@.str.3 = [10 x i8] c": [ %s ]\0A\00"
define void @test_pass(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @default_parser(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" \00"
@.str.2 = [5 x i8] c"Ok \00"
@.str.3 = [10 x i8] c": [ %s ]\0A\00"
define void @test_pass(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @default_parser(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
void init(void) { glClearColor(0, 0, 0, 0); }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <glClearColor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <glClearColor@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_SetWithFlag_f(int);
void Cvar_Seta_f(void) { Cvar_SetWithFlag_f(1); }


x86 assembly (clang, -O0):
<Cvar_Seta_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <Cvar_SetWithFlag_f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cvar_Seta_f>:
mov    $0x1,%edi
jmp    1030 <Cvar_SetWithFlag_f@plt>

LLVM IR (-O0):
define void @Cvar_Seta_f() {
%1 = call i32 @Cvar_SetWithFlag_f(i32 1)
ret void
}

LLVM IR (-O2):
define void @Cvar_Seta_f() {
%1 = tail call i32 @Cvar_SetWithFlag_f(i32 1)
ret void
}
int console_kbhit(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @console_kbhit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @console_kbhit() {
ret i32 0
}
/* Variables and functions */
int change_memory_attr(unsigned long, int, int);
int set_memory_nx(unsigned long addr, int numpages) {
  return change_memory_attr(addr, numpages, 2);
}


x86 assembly (clang, -O0):
<set_memory_nx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x2,%edx
call   1030 <change_memory_attr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_memory_nx>:
mov    $0x2,%edx
jmp    1030 <change_memory_attr@plt>

LLVM IR (-O0):
define i32 @set_memory_nx(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i32 @change_memory_attr(i64 %5, i32 %6, i32 2)
ret i32 %7
}

LLVM IR (-O2):
define i32 @set_memory_nx(i64 %0, i32 %1) {
%3 = tail call i32 @change_memory_attr(i64 %0, i32 %1, i32 2)
ret i32 %3
}
/* Variables and functions */
int strlen(char *s) {
  int i;
  for (i = 0; s[i] != '\0';)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ log_openssl_error(char const *, int);
uint8_t check_openssl_result(int result, int expected_result,
                             uint8_t expected_equal, const char *file,
                             int line) {
  const uint8_t ret = (result == expected_result) == expected_equal;
  if (!ret)
    log_openssl_error(file, line);
  return ret;
}


x86 assembly (clang, -O0):
<check_openssl_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    115b <check_openssl_result+0x4b>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <log_openssl_error@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_openssl_result>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
xor    %ebp,%ebp
cmp    %esi,%edi
sete   %bpl
cmp    %edx,%ebp
je     112c <check_openssl_result+0x1c>
mov    %rcx,%rdi
mov    %r8d,%esi
call   1030 <log_openssl_error@plt>
xor    %eax,%eax
cmp    %ebx,%ebp
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check_openssl_result(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = load i32, i32* %8
%17 = icmp eq i32 %15, %16
%18 = zext i1 %17 to i32
store i32 %18, i32* %11
%19 = load i32, i32* %11
%20 = icmp ne i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %5
%22 = load i8*, i8** %9
%23 = load i32, i32* %10
%24 = call i32 @log_openssl_error(i8* %22, i32 %23)
br label %25
25: ; preds = %21, %5
%26 = load i32, i32* %11
ret i32 %26
}

LLVM IR (-O2):
define i32 @check_openssl_result(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = icmp eq i32 %0, %1
%7 = zext i1 %6 to i32
%8 = icmp eq i32 %7, %2
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @log_openssl_error(i8* %3, i32 %4)
br label %11
11: ; preds = %9, %5
%12 = zext i1 %8 to i32
ret i32 %12
}