xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ XIMPreeditCaretCallbackStruct;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XIMPreeditCaretCallbackStruct(void) {
  XIMPreeditCaretCallbackStruct *_p = (XIMPreeditCaretCallbackStruct *)malloc(
      sizeof(XIMPreeditCaretCallbackStruct));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XIMPreeditCaretCallbackStruct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XIMPreeditCaretCallbackStruct+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XIMPreeditCaretCallbackStruct>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XIMPreeditCaretCallbackStruct+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XIMPreeditCaretCallbackStruct() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XIMPreeditCaretCallbackStruct() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ test_controller();
int /*<<< orphan*/ test_material();
int /*<<< orphan*/ test_repository();
void test() {
  test_material();
  test_repository();
  test_controller();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_material@plt>
mov    $0x0,%al
call   1050 <test_repository@plt>
mov    $0x0,%al
call   1040 <test_controller@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1030 <test_material@plt>
xor    %eax,%eax
call   1050 <test_repository@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_controller@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 (...) @test_material()
%2 = call i32 (...) @test_repository()
%3 = call i32 (...) @test_controller()
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @test_material()
%2 = tail call i32 (...) @test_repository()
%3 = tail call i32 (...) @test_controller()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Func() { printf("RELEASE: What's up?!\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"RELEASE: What's up?!\0A\00"
define void @Func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"RELEASE: What's up?!\00"
define void @Func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_cycleno(int);
void fgmvwrite_cycleno_(int *number) { gmvwrite_cycleno(*number); }


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

x86 assembly (clang, -O2):
<fgmvwrite_cycleno_>:
mov    (%rdi),%edi
jmp    1030 <gmvwrite_cycleno@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_cycleno_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @gmvwrite_cycleno(i32 %2)
ret void
}
/* Variables and functions */
int f276(int *);
int f277(int *p) { return f276(p); }


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

x86 assembly (clang, -O2):
<f277>:
jmp    1030 <f276@plt>

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

LLVM IR (-O2):
define i32 @f277(i32* %0) {
%2 = tail call i32 @f276(i32* %0)
ret i32 %2
}
void XkbFreeGeomKeys() {}


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

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

LLVM IR (-O0):
define void @XkbFreeGeomKeys() {
ret void
}

LLVM IR (-O2):
define void @XkbFreeGeomKeys() {
ret void
}
/* Variables and functions */
int htoi(char *);
int /*<<< orphan*/ printf(char *, char *, int);
int main() {
  char *s = "0x1Af";
  printf("integer value of hex %s is %d\n", s, htoi(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <htoi@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <htoi@plt>
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"0x1Af\00"
@.str.1 = [31 x i8] c"integer value of hex %s is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @htoi(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %3, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"0x1Af\00"
@.str.1 = [31 x i8] c"integer value of hex %s is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @htoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
void coffeecatch_start_alarm(void) { (void)alarm(30); }


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

x86 assembly (clang, -O2):
<coffeecatch_start_alarm>:
mov    $0x1e,%edi
jmp    1030 <alarm@plt>

LLVM IR (-O0):
define void @coffeecatch_start_alarm() {
%1 = call i32 @alarm(i32 30)
ret void
}

LLVM IR (-O2):
define void @coffeecatch_start_alarm() {
%1 = tail call i32 @alarm(i32 30)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *mustmalloc(size_t n) {
  void *p;
  if ((p = malloc(n)) == 0) {
    fprintf(stderr, "malloc failed\n");
    exit(1);
  }
  return (p);
}


x86 assembly (clang, -O0):
<mustmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1172 <mustmalloc+0x42>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%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):
<mustmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <mustmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
define i8* @mustmalloc(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 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
define noalias i8* @mustmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
int sub1(int i, int j, int k) { return k ? i : j; }


x86 assembly (clang, -O0):
<sub1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1122 <sub1+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <sub1+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub1>:
mov    %edi,%eax
test   %edx,%edx
cmove  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @sub1(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i32 %1, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *, int,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void test_error_handler(int ltfat_errno, const char *file, int line,
                        const char *funcname, const char *reason) {
  fprintf(stderr, "       [ERROR %d]: (%s:%d:): [%s]: %s\n", -ltfat_errno, file,
          line, funcname, reason);
  fflush(stderr);
}


x86 assembly (clang, -O0):
<test_error_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xea1(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_error_handler>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r9
mov    %edx,%eax
mov    %rsi,%rcx
mov    %edi,%edx
mov    0x2eaa(%rip),%rbx
mov    (%rbx),%edi
neg    %edx
mov    %r8,(%rsp)
lea    0xebb(%rip),%rsi
mov    %eax,%r8d
call   1030 <fprintf@plt>
mov    (%rbx),%edi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c" [ERROR %d]: (%s:%d:): [%s]: %s\0A\00"
define void @test_error_handler(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* @stderr
%12 = load i32, i32* %6
%13 = sub nsw i32 0, %12
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i32 %15, i8* %16, i8* %17)
%19 = load i32, i32* @stderr
%20 = call i32 @fflush(i32 %19)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c" [ERROR %d]: (%s:%d:): [%s]: %s\0A\00"
define void @test_error_handler(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = load i32, i32* @stderr
%7 = sub nsw i32 0, %0
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %1, i32 %2, i8* %3, i8* %4)
%9 = load i32, i32* @stderr
%10 = tail call i32 @fflush(i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void breakout(unsigned long int *const i) {
  (void)i;
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<breakout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<breakout>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @breakout(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @breakout(i64* nocapture readnone %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
int WEOF;
wint_t btowc(int c) {
  if (c & 0x80)
    return WEOF;
  return c;
}


x86 assembly (clang, -O0):
<btowc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1129 <btowc+0x29>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    112f <btowc+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btowc>:
mov    %edi,%eax
test   $0x80,%al
je     110f <btowc+0xf>
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@WEOF = global i32 0
define i32 @btowc(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
%4 = load i32, i32* @WEOF
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
char *match_msg_nomatch(const char *s) {
  static char buf[((2048) * 4)];
  snprintf(buf, sizeof(buf), "I don't understand '%s'.", s);
  return buf;
}


x86 assembly (clang, -O0):
<match_msg_nomatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0x2f19(%rip),%rdi
mov    $0x2000,%esi
lea    0xecd(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f01(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_msg_nomatch>:
push   %rbx
mov    %rdi,%rcx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rdx
mov    %rbx,%rdi
mov    $0x2000,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@match_msg_nomatch.buf = internal global [8192 x i8] zeroinitializer
@.str = [25 x i8] c"I don't understand '%s'.\00"
define i8* @match_msg_nomatch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @match_msg_nomatch.buf, i64 0, i64 0), i32 8192, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @match_msg_nomatch.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@match_msg_nomatch.buf = internal global [8192 x i8] zeroinitializer
@.str = [25 x i8] c"I don't understand '%s'.\00"
define i8* @match_msg_nomatch(i8* %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @match_msg_nomatch.buf, i64 0, i64 0), i32 8192, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @match_msg_nomatch.buf, i64 0, i64 0)
}
unsigned char *hmac256digest(bitstr, bitcnt, key, keylen)
unsigned char *bitstr;
unsigned long bitcnt;
unsigned char *key;
unsigned int keylen;
{ return ((unsigned char *)hmaccomp(256, 1, bitstr, bitcnt, key, keylen)); }


x86 assembly (clang, -O0):
<hmac256digest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x100,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <hmaccomp@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac256digest>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x100,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <hmaccomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @hmac256digest(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 256, i32 1, i8* %9, i64 %10, i8* %11, i32 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @hmac256digest(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 256, i32 1, i8* %0, i64 %1, i8* %2, i32 %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
int main(void) {
  char a[5] = {"china"};
  printf("%s", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x61,0x4(%rsp)
movl   $0x6e696863,(%rsp)
lea    0xee1(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [5 x i8] c"china"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i8] c"china"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int simulate_thread_final_verify();
int simulate_thread_wrapper_final_verify() {
  int ret = simulate_thread_final_verify();
  return ret;
}


x86 assembly (clang, -O0):
<simulate_thread_wrapper_final_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <simulate_thread_final_verify@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulate_thread_wrapper_final_verify>:
xor    %eax,%eax
jmp    1030 <simulate_thread_final_verify@plt>

LLVM IR (-O0):
define i32 @simulate_thread_wrapper_final_verify() {
%1 = alloca i32
%2 = call i32 (...) @simulate_thread_final_verify()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @simulate_thread_wrapper_final_verify() {
%1 = tail call i32 (...) @simulate_thread_final_verify()
ret i32 %1
}
void option_unset_unit2MODIF_EXTENDED() {}


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

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

LLVM IR (-O0):
define void @option_unset_unit2MODIF_EXTENDED() {
ret void
}

LLVM IR (-O2):
define void @option_unset_unit2MODIF_EXTENDED() {
ret void
}
int check_victory(int word_letters[10], int guessed[27]) {
  int letter_guessed = 1, i = 0, letter = 0;
  while (letter_guessed) {
    letter = word_letters[i];
    if (!guessed[letter]) {
      letter_guessed = 0;
    }
    i++;
  }
  return letter_guessed;
}


x86 assembly (clang, -O0):
<check_victory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1160 <check_victory+0x60>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1152 <check_victory+0x52>
movl   $0x0,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1121 <check_victory+0x21>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_victory>:
movslq (%rdi),%rax
add    $0x4,%rdi
cmpl   $0x0,(%rsi,%rax,4)
jne    1100 <check_victory>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @check_victory(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %11, %3 ]
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 0
%11 = add nuw i64 %4, 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i32 0
}
double fatorial(double n) {
  double r = 1L;
  double f = n;
  for (f = 1; f <= n; f++)
    r = r * f;
  return r;
}


x86 assembly (clang, -O0):
<fatorial>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1167 <fatorial+0x67>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea8(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    112d <fatorial+0x2d>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatorial>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     112e <fatorial+0x2e>
movsd  0xeea(%rip),%xmm2
movapd %xmm2,%xmm3
movapd %xmm2,%xmm1
xchg   %ax,%ax
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm3
ucomisd %xmm3,%xmm0
jae    1120 <fatorial+0x20>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fatorial(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %3
%5 = load double, double* %2
store double %5, double* %4
store double 1.000000e+00, double* %4
br label %6
6: ; preds = %14, %1
%7 = load double, double* %4
%8 = load double, double* %2
%9 = fcmp ole double %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fmul double %11, %12
store double %13, double* %3
br label %14
14: ; preds = %10
%15 = load double, double* %4
%16 = fadd double %15, 1.000000e+00
store double %16, double* %4
br label %6
17: ; preds = %6
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @fatorial(double %0) {
%2 = fcmp ult double %0, 1.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi double [ %7, %3 ], [ 1.000000e+00, %1 ]
%5 = phi double [ %6, %3 ], [ 1.000000e+00, %1 ]
%6 = fmul double %5, %4
%7 = fadd double %4, 1.000000e+00
%8 = fcmp ugt double %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi double [ 1.000000e+00, %1 ], [ %6, %3 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ do_nothing();
int main() {
  int i;
  for (i = 0; i < 2; i++)
    do_nothing();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <do_nothing@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <do_nothing@plt>
xor    %eax,%eax
call   1030 <do_nothing@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 2
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @do_nothing()
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @do_nothing()
%2 = tail call i32 (...) @do_nothing()
ret i32 0
}
int cairo_code_draw_hal_get_width() { return 82; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_hal_get_width() {
ret i32 82
}

LLVM IR (-O2):
define i32 @cairo_code_draw_hal_get_width() {
ret i32 82
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int enterChoice(void) {
  int menuChoice;
  printf("\nEnter your choice\n"
         "1 - store a formatted text file of acounts called\n"
         "    \"accounts.txt\" for printing\n"
         "2 - update an account\n"
         "3 - add a new account\n"
         "4 - delete an account\n"
         "5 - end program\n? ");
  scanf("%d", &menuChoice);
  return menuChoice;
}


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

x86 assembly (clang, -O2):
<enterChoice>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf86(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [186 x i8] c"\0AEnter your choice\0A1 - store a formatted text file of acounts called\0A \22accounts.txt\22 for printing\0A2 - update an account\0A3 - add a new account\0A4 - delete an account\0A5 - end program\0A? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @enterChoice() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [186 x i8] c"\0AEnter your choice\0A1 - store a formatted text file of acounts called\0A \22accounts.txt\22 for printing\0A2 - update an account\0A3 - add a new account\0A4 - delete an account\0A5 - end program\0A? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @enterChoice() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([186 x i8], [186 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
void MMA8491Q_WRITE_REGISTER() {}


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

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

LLVM IR (-O0):
define void @MMA8491Q_WRITE_REGISTER() {
ret void
}

LLVM IR (-O2):
define void @MMA8491Q_WRITE_REGISTER() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fft(double *, double *, double *, double *);
void workload(double real[1024], double img[1024], double real_twid[1024 / 2],
              double img_twid[1024 / 2]) {
#pragma HLS INTERFACE m_axi port = real offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = img offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = real_twid offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = img_twid offset = slave bundle = gmem
#pragma HLS INTERFACE s_axilite port = real bundle = control
#pragma HLS INTERFACE s_axilite port = img bundle = control
#pragma HLS INTERFACE s_axilite port = real_twid bundle = control
#pragma HLS INTERFACE s_axilite port = img_twid bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  fft(real, img, real_twid, img_twid);
  return;
}


x86 assembly (clang, -O0):
<workload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <fft@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<workload>:
jmp    1030 <fft@plt>

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

LLVM IR (-O2):
define void @workload(double* %0, double* %1, double* %2, double* %3) {
%5 = tail call i32 @fft(double* %0, double* %1, double* %2, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", 15 - 37);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -22)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eat();
int /*<<< orphan*/ put_fork(int);
int /*<<< orphan*/ take_fork(int);
int /*<<< orphan*/ think();
void philo(int i) {
  while (1) {
    think();
    take_fork(i);
    take_fork((i + 1) % 5);
    eat();
    put_fork(i);
    put_fork((i + 1) % 5);
  }
}


x86 assembly (clang, -O0):
<philo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <think@plt>
mov    -0x4(%rbp),%edi
call   1060 <take_fork@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1060 <take_fork@plt>
mov    $0x0,%al
call   1030 <eat@plt>
mov    -0x4(%rbp),%edi
call   1040 <put_fork@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1040 <put_fork@plt>
jmp    114b <philo+0xb>

x86 assembly (clang, -O2):
<philo>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
lea    0x1(%r14),%eax
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <think@plt>
mov    %r14d,%edi
call   1060 <take_fork@plt>
mov    %ebx,%edi
call   1060 <take_fork@plt>
xor    %eax,%eax
call   1030 <eat@plt>
mov    %r14d,%edi
call   1040 <put_fork@plt>
mov    %ebx,%edi
call   1040 <put_fork@plt>
jmp    1170 <philo+0x30>

LLVM IR (-O0):
define void @philo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @think()
%5 = load i32, i32* %2
%6 = call i32 @take_fork(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = srem i32 %8, 5
%10 = call i32 @take_fork(i32 %9)
%11 = call i32 (...) @eat()
%12 = load i32, i32* %2
%13 = call i32 @put_fork(i32 %12)
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
%16 = srem i32 %15, 5
%17 = call i32 @put_fork(i32 %16)
br label %3
}

LLVM IR (-O2):
define void @philo(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 5
br label %4
4: ; preds = %1, %4
%5 = tail call i32 (...) @think()
%6 = tail call i32 @take_fork(i32 %0)
%7 = tail call i32 @take_fork(i32 %3)
%8 = tail call i32 (...) @eat()
%9 = tail call i32 @put_fork(i32 %0)
%10 = tail call i32 @put_fork(i32 %3)
br label %4
}
void I2C3_ER_IRQHandler() {}


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

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

LLVM IR (-O0):
define void @I2C3_ER_IRQHandler() {
ret void
}

LLVM IR (-O2):
define void @I2C3_ER_IRQHandler() {
ret void
}
void stringcpy(char *s, char *t) {
  while (((*s++) = (*t++)) != '\0')
    ;
}


x86 assembly (clang, -O0):
<stringcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <stringcpy+0x3f>
jmp    110c <stringcpy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringcpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <stringcpy+0x10>
ret

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

LLVM IR (-O2):
define void @stringcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
unsigned long str$round_not(const long *places, unsigned long *flags,
                            const unsigned long *asign, const long *aexp,
                            const struct dsc$descriptor_s *adigits,
                            const unsigned long *bsign, const long *bexp,
                            const struct dsc$descriptor_s *bdigits,
                            unsigned long *csign, long *cexp,
                            struct dsc$descriptor_s *cdigits) {
  assert(0);
  return 2392148;
}


x86 assembly (clang, -O0):
<str$round_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    $0x248054,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str$round_not>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x248054,%eax
pop    %rcx
ret

LLVM IR (-O0):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$round_not"(i64* %0, i64* %1, i64* %2, i64* %3, %"struct.dsc$descriptor_s"* %4, i64* %5, i64* %6, %"struct.dsc$descriptor_s"* %7, i64* %8, i64* %9, %"struct.dsc$descriptor_s"* %10) {
%12 = alloca i64*
%13 = alloca i64*
%14 = alloca i64*
%15 = alloca i64*
%16 = alloca %"struct.dsc$descriptor_s"*
%17 = alloca i64*
%18 = alloca i64*
%19 = alloca %"struct.dsc$descriptor_s"*
%20 = alloca i64*
%21 = alloca i64*
%22 = alloca %"struct.dsc$descriptor_s"*
store i64* %0, i64** %12
store i64* %1, i64** %13
store i64* %2, i64** %14
store i64* %3, i64** %15
store %"struct.dsc$descriptor_s"* %4, %"struct.dsc$descriptor_s"** %16
store i64* %5, i64** %17
store i64* %6, i64** %18
store %"struct.dsc$descriptor_s"* %7, %"struct.dsc$descriptor_s"** %19
store i64* %8, i64** %20
store i64* %9, i64** %21
store %"struct.dsc$descriptor_s"* %10, %"struct.dsc$descriptor_s"** %22
%23 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 0)
ret i64 2392148
}

LLVM IR (-O2):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$round_not"(i64* nocapture readnone %0, i64* nocapture readnone %1, i64* nocapture readnone %2, i64* nocapture readnone %3, %"struct.dsc$descriptor_s"* nocapture readnone %4, i64* nocapture readnone %5, i64* nocapture readnone %6, %"struct.dsc$descriptor_s"* nocapture readnone %7, i64* nocapture readnone %8, i64* nocapture readnone %9, %"struct.dsc$descriptor_s"* nocapture readnone %10) {
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 0)
ret i64 2392148
}
void SysTimerOn() {}


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

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

LLVM IR (-O0):
define void @SysTimerOn() {
ret void
}

LLVM IR (-O2):
define void @SysTimerOn() {
ret void
}
void fe_silc_modules_init(void) {}


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

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

LLVM IR (-O0):
define void @fe_silc_modules_init() {
ret void
}

LLVM IR (-O2):
define void @fe_silc_modules_init() {
ret void
}
main() {
  int a = 1, b = 5, c;
  c = a + b;
  printf(c);
  c = a * b;
  printf(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 5, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = call i32 (i8*, ...) @printf(i8* %9)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
%17 = call i32 (i8*, ...) @printf(i8* %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 6 to i8*))
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 5 to i8*))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fp0();
int /*<<< orphan*/ fp1(int);
int /*<<< orphan*/ fp2(int *);
int /*<<< orphan*/ fp3(double);
int main(int argc, char *argv[]) {
  if (argc > 0) {
    fp0();
    fp1(argc);
    fp2(&argc);
    fp3(2.0 * argc);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    118e <main+0x4e>
mov    $0x0,%al
call   1060 <fp0@plt>
mov    -0x8(%rbp),%edi
call   1030 <fp1@plt>
lea    -0x8(%rbp),%rdi
call   1050 <fp2@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe7b(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <fp3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
test   %edi,%edi
jle    1176 <main+0x36>
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <fp0@plt>
mov    %ebx,%edi
call   1030 <fp1@plt>
lea    0xc(%rsp),%rdi
call   1050 <fp2@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1040 <fp3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = call i32 (...) @fp0()
%10 = load i32, i32* %4
%11 = call i32 @fp1(i32 %10)
%12 = call i32 @fp2(i32* %4)
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
%15 = fmul double 2.000000e+00, %14
%16 = call i32 @fp3(double %15)
br label %17
17: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = tail call i32 (...) @fp0()
%7 = tail call i32 @fp1(i32 %0)
%8 = call i32 @fp2(i32* %3)
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 2.000000e+00
%12 = call i32 @fp3(double %11)
br label %13
13: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
scalar_t__ ftell(int /*<<< orphan*/ *);
size_t fileSizeLzma(char *filename) {
  FILE *fpText;
  size_t fsize;
  fpText = fopen(filename, "rb");
  fsize = 0;
  if (fpText) {
    fseek(fpText, 0, 2);
    fsize = (size_t)ftell(fpText);
    fclose(fpText);
  }
  return fsize;
}


x86 assembly (clang, -O0):
<fileSizeLzma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1199 <fileSizeLzma+0x59>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1050 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileSizeLzma>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     117f <fileSizeLzma+0x3f>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r14,%rax
jmp    1181 <fileSizeLzma+0x41>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i64 @fileSizeLzma(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
store i64 0, i64* %4
%7 = load i32*, i32** %3
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i32*, i32** %3
%11 = call i32 @fseek(i32* %10, i32 0, i32 2)
%12 = load i32*, i32** %3
%13 = call i64 @ftell(i32* %12)
store i64 %13, i64* %4
%14 = load i32*, i32** %3
%15 = call i32 @fclose(i32* %14)
br label %16
16: ; preds = %9, %1
%17 = load i64, i64* %4
ret i64 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i64 @fileSizeLzma(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @fseek(i32* %2, i32 0, i32 2)
%6 = tail call i64 @ftell(i32* %2)
%7 = tail call i32 @fclose(i32* %2)
br label %8
8: ; preds = %4, %1
%9 = phi i64 [ %6, %4 ], [ 0, %1 ]
ret i64 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int is_in_range(uint32_t start, uint32_t end, uint32_t header_len,
                uint32_t offset, uint32_t size) {
  return (offset >= start + header_len && offset + size <= end);
}


x86 assembly (clang, -O0):
<is_in_range>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rdx
add    -0x18(%rbp),%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x29(%rbp)
jl     1144 <is_in_range+0x44>
mov    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
cmp    -0x10(%rbp),%rax
setle  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_range>:
add    %rdx,%rdi
cmp    %rcx,%rdi
setle  %al
add    %rcx,%r8
cmp    %rsi,%r8
setle  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_in_range(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %9
%12 = load i64, i64* %6
%13 = load i64, i64* %8
%14 = add nsw i64 %12, %13
%15 = icmp sge i64 %11, %14
br i1 %15, label %16, label %22
16: ; preds = %5
%17 = load i64, i64* %9
%18 = load i64, i64* %10
%19 = add nsw i64 %17, %18
%20 = load i64, i64* %7
%21 = icmp sle i64 %19, %20
br label %22
22: ; preds = %16, %5
%23 = phi i1 [ false, %5 ], [ %21, %16 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_in_range(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = add nsw i64 %2, %0
%7 = icmp sle i64 %6, %3
%8 = add nsw i64 %4, %3
%9 = icmp sle i64 %8, %1
%10 = select i1 %7, i1 %9, i1 false
%11 = zext i1 %10 to i32
ret i32 %11
}