xunge/DecIR huggingface dataset:
double berechne_jahres_durchschnittskosten(double jahres_fahrleistung,
                                           double kosten_pro_einheit) {
  double jahres_durchschnittskosten = jahres_fahrleistung * kosten_pro_einheit;
  return jahres_durchschnittskosten;
}


x86 assembly (clang, -O0):
<berechne_jahres_durchschnittskosten>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<berechne_jahres_durchschnittskosten>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @berechne_jahres_durchschnittskosten(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
int read_data_cmd();
int /*<<< orphan*/ send_ctrl_cmd(int);
int /*<<< orphan*/ send_data_cmd(int);
unsigned int lcm_compare_id(void) {
  send_ctrl_cmd(0xB9);
  send_data_cmd(0xFF);
  send_data_cmd(0x83);
  send_data_cmd(0x69);
  send_ctrl_cmd(0xC3);
  send_data_cmd(0xFF);
  send_ctrl_cmd(0xF4);
  read_data_cmd();
  return ((0x69) == read_data_cmd()) ? 1 : 0;
}


x86 assembly (clang, -O0):
<lcm_compare_id>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb9,%edi
call   1050 <send_ctrl_cmd@plt>
mov    $0xff,%edi
call   1040 <send_data_cmd@plt>
mov    $0x83,%edi
call   1040 <send_data_cmd@plt>
mov    $0x69,%edi
call   1040 <send_data_cmd@plt>
mov    $0xc3,%edi
call   1050 <send_ctrl_cmd@plt>
mov    $0xff,%edi
call   1040 <send_data_cmd@plt>
mov    $0xf4,%edi
call   1050 <send_ctrl_cmd@plt>
mov    $0x0,%al
call   1030 <read_data_cmd@plt>
mov    $0x0,%al
call   1030 <read_data_cmd@plt>
mov    %eax,%esi
mov    $0x69,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm_compare_id>:
push   %rax
mov    $0xb9,%edi
call   1050 <send_ctrl_cmd@plt>
mov    $0xff,%edi
call   1040 <send_data_cmd@plt>
mov    $0x83,%edi
call   1040 <send_data_cmd@plt>
mov    $0x69,%edi
call   1040 <send_data_cmd@plt>
mov    $0xc3,%edi
call   1050 <send_ctrl_cmd@plt>
mov    $0xff,%edi
call   1040 <send_data_cmd@plt>
mov    $0xf4,%edi
call   1050 <send_ctrl_cmd@plt>
xor    %eax,%eax
call   1030 <read_data_cmd@plt>
xor    %eax,%eax
call   1030 <read_data_cmd@plt>
xor    %ecx,%ecx
cmp    $0x69,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lcm_compare_id() {
%1 = call i32 @send_ctrl_cmd(i32 185)
%2 = call i32 @send_data_cmd(i32 255)
%3 = call i32 @send_data_cmd(i32 131)
%4 = call i32 @send_data_cmd(i32 105)
%5 = call i32 @send_ctrl_cmd(i32 195)
%6 = call i32 @send_data_cmd(i32 255)
%7 = call i32 @send_ctrl_cmd(i32 244)
%8 = call i32 (...) @read_data_cmd()
%9 = call i32 (...) @read_data_cmd()
%10 = icmp eq i32 105, %9
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
ret i32 %12
}

LLVM IR (-O2):
define i32 @lcm_compare_id() {
%1 = tail call i32 @send_ctrl_cmd(i32 185)
%2 = tail call i32 @send_data_cmd(i32 255)
%3 = tail call i32 @send_data_cmd(i32 131)
%4 = tail call i32 @send_data_cmd(i32 105)
%5 = tail call i32 @send_ctrl_cmd(i32 195)
%6 = tail call i32 @send_data_cmd(i32 255)
%7 = tail call i32 @send_ctrl_cmd(i32 244)
%8 = tail call i32 (...) @read_data_cmd()
%9 = tail call i32 (...) @read_data_cmd()
%10 = icmp eq i32 %9, 105
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __insn_bfins(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                int);
uint64_t copy_byte(uint8_t byte) {
  uint64_t word = byte;
  word = __insn_bfins(word, word, 8, 15);
  word = __insn_bfins(word, word, 16, 31);
  word = __insn_bfins(word, word, 32, 63);
  return word;
}


x86 assembly (clang, -O0):
<copy_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x8,%edx
mov    $0xf,%ecx
call   1030 <__insn_bfins@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x10,%edx
mov    $0x1f,%ecx
call   1030 <__insn_bfins@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x20,%edx
mov    $0x3f,%ecx
call   1030 <__insn_bfins@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_byte>:
push   %rax
mov    %edi,%esi
mov    $0x8,%edx
mov    $0xf,%ecx
call   1030 <__insn_bfins@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    $0x10,%edx
mov    $0x1f,%ecx
call   1030 <__insn_bfins@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    $0x20,%edx
mov    $0x3f,%ecx
pop    %rax
jmp    1030 <__insn_bfins@plt>

LLVM IR (-O0):
define i32 @copy_byte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @__insn_bfins(i32 %5, i32 %6, i32 8, i32 15)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @__insn_bfins(i32 %8, i32 %9, i32 16, i32 31)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = call i32 @__insn_bfins(i32 %11, i32 %12, i32 32, i32 63)
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @copy_byte(i32 %0) {
%2 = tail call i32 @__insn_bfins(i32 %0, i32 %0, i32 8, i32 15)
%3 = tail call i32 @__insn_bfins(i32 %2, i32 %2, i32 16, i32 31)
%4 = tail call i32 @__insn_bfins(i32 %3, i32 %3, i32 32, i32 63)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ refresh();
void _io_close_display(int e) {
  if (e == 0) {
    clear();
    refresh();
  }
  (void)endwin();
}


x86 assembly (clang, -O0):
<_io_close_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1153 <_io_close_display+0x23>
mov    $0x0,%al
call   1050 <clear@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_io_close_display>:
test   %edi,%edi
je     113b <_io_close_display+0xb>
xor    %eax,%eax
jmp    1040 <endwin@plt>
push   %rax
xor    %eax,%eax
call   1050 <clear@plt>
xor    %eax,%eax
call   1030 <refresh@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @_io_close_display(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 (...) @clear()
%7 = call i32 (...) @refresh()
br label %8
8: ; preds = %5, %1
%9 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @_io_close_display(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @clear()
%5 = tail call i32 (...) @refresh()
br label %6
6: ; preds = %3, %1
%7 = tail call i32 (...) @endwin()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glRectfv(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void Rectfv(GLfloat v1[2], GLfloat v2[2]) { glRectfv(v1, v2); }


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

x86 assembly (clang, -O2):
<Rectfv>:
jmp    1030 <glRectfv@plt>

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

LLVM IR (-O2):
define void @Rectfv(i32* %0, i32* %1) {
%3 = tail call i32 @glRectfv(i32* %0, i32* %1)
ret void
}
double MtoIN(double M) { return M * 39.3700787; }


x86 assembly (clang, -O0):
<MtoIN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MtoIN>:
mulsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @MtoIN(double %0) {
%2 = fmul double %0, 0x4043AF5EBD24B91D
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *message) {
  if (message) {
    printf("Error:\n");
    printf("\t%s\n\n", message);
  }
  printf("Usage:\n");
  printf("\tsimpletask list.task\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <usage+0x37>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
test   %rdi,%rdi
je     1146 <usage+0x26>
mov    %rdi,%rbx
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Error:\0A\00"
@.str.1 = [6 x i8] c"\09%s\0A\0A\00"
@.str.2 = [8 x i8] c"Usage:\0A\00"
@.str.3 = [23 x i8] c"\09simpletask list.task\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %5, %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"\09%s\0A\0A\00"
@str = [7 x i8] c"Usage:\00"
@str.4 = [22 x i8] c"\09simpletask list.task\00"
@str.5 = [7 x i8] c"Error:\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close_log();
int /*<<< orphan*/ function_one();
int /*<<< orphan*/ function_two();
int /*<<< orphan*/ log_init();
int /*<<< orphan*/ set_log_dir(char *, char *);
int main(int argc, char *argv[]) {
  set_log_dir("/tmp/foo/bar/",
              "/home/g/cor-logs/incubator-corinthia/experiments/logger/");
  log_init();
  function_one();
  function_two();
  close_log();
  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)
lea    0xe93(%rip),%rdi
lea    0xe9a(%rip),%rsi
call   1050 <set_log_dir@plt>
mov    $0x0,%al
call   1030 <log_init@plt>
mov    $0x0,%al
call   1070 <function_one@plt>
mov    $0x0,%al
call   1040 <function_two@plt>
mov    $0x0,%al
call   1060 <close_log@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1050 <set_log_dir@plt>
xor    %eax,%eax
call   1030 <log_init@plt>
xor    %eax,%eax
call   1070 <function_one@plt>
xor    %eax,%eax
call   1040 <function_two@plt>
xor    %eax,%eax
call   1060 <close_log@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/foo/bar/\00"
@.str.1 = [57 x i8] c"/home/g/cor-logs/incubator-corinthia/experiments/logger/\00"
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 = call i32 @set_log_dir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (...) @log_init()
%8 = call i32 (...) @function_one()
%9 = call i32 (...) @function_two()
%10 = call i32 (...) @close_log()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/foo/bar/\00"
@.str.1 = [57 x i8] c"/home/g/cor-logs/incubator-corinthia/experiments/logger/\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @set_log_dir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @log_init()
%5 = tail call i32 (...) @function_one()
%6 = tail call i32 (...) @function_two()
%7 = tail call i32 (...) @close_log()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xf4() {
  Assert_real((isgraph(244) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              1225, ("isgraph should be 0 for 0xf4"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xf4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf4,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4c9,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xf4>:
push   %rax
mov    $0xf4,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c9,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf4\00"
define void @t_isgraph_0xf4() {
%1 = call i64 @isgraph(i32 244)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf4\00"
define void @t_isgraph_0xf4() {
%1 = tail call i64 @isgraph(i32 244)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int bit_BMI2;
int /*<<< orphan*/ cpuid(int, int *);
bool has_bmi2() {
  int cpu_info[4] = {0};
  cpuid((7), cpu_info);
  return cpu_info[(1)] & bit_BMI2;
}


x86 assembly (clang, -O0):
<has_bmi2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
lea    -0x10(%rbp),%rsi
mov    $0x7,%edi
call   1040 <cpuid@plt>
mov    -0xc(%rbp),%eax
mov    0x2e98(%rip),%rcx
and    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_bmi2>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x7,%edi
call   1030 <cpuid@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
and    0x4(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@bit_BMI2 = global i32 0
define i32 @has_bmi2() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @cpuid(i32 7, i32* %3)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%6 = load i32, i32* %5
%7 = load i32, i32* @bit_BMI2
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@bit_BMI2 = global i32 0
define i32 @has_bmi2() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @cpuid(i32 7, i32* %3)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%6 = load i32, i32* %5
%7 = load i32, i32* @bit_BMI2
%8 = and i32 %7, %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ __crow_f4();
int expect(int, int /*<<< orphan*/);
int test_f4() { return expect(8, __crow_f4()); }


x86 assembly (clang, -O0):
<test_f4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <__crow_f4@plt>
mov    %eax,%esi
mov    $0x8,%edi
call   1040 <expect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_f4>:
push   %rax
xor    %eax,%eax
call   1030 <__crow_f4@plt>
mov    $0x8,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <expect@plt>

LLVM IR (-O0):
define i32 @test_f4() {
%1 = call i32 (...) @__crow_f4()
%2 = call i32 @expect(i32 8, i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @test_f4() {
%1 = tail call i32 (...) @__crow_f4()
%2 = tail call i32 @expect(i32 8, i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t LCDIDDStatusRead(uint32_t ui32Base, uint32_t ui32CS) {
  uint32_t ui32Reg;
  ;
  ;
  ui32Reg = ui32CS ? 0x00000020 : 0x00000014;
  return ((uint16_t)(*((volatile uint32_t *)(ui32Base + ui32Reg))));
}


x86 assembly (clang, -O0):
<LCDIDDStatusRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x14,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDIDDStatusRead>:
test   %esi,%esi
mov    $0x14,%eax
mov    $0x20,%ecx
cmove  %eax,%ecx
movslq %edi,%rax
mov    (%rcx,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @LCDIDDStatusRead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 32, i32 20
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @LCDIDDStatusRead(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 20, i32 32
%5 = add nsw i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}
f() {
  __label__ lbl1;
  __label__ lbl2;
lbl1:;
lbl2:;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f+0x9>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %0
br label %3
3: ; preds = %2
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
char *revstrcasestr(char const *, char const *, char const *);
char *mbrevstrcasestr(const char *haystack, const char *needle,
                      const char *pointer) {
  return revstrcasestr(haystack, needle, pointer);
}


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

x86 assembly (clang, -O2):
<mbrevstrcasestr>:
jmp    1030 <revstrcasestr@plt>

LLVM IR (-O0):
define i8* @mbrevstrcasestr(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* @revstrcasestr(i8* %7, i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @mbrevstrcasestr(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @revstrcasestr(i8* %0, i8* %1, i8* %2)
ret i8* %4
}
int xmlUCSIsBuhid(int code) { return (((code >= 0x1740) && (code <= 0x175F))); }


x86 assembly (clang, -O0):
<xmlUCSIsBuhid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1740,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsBuhid+0x26>
cmpl   $0x175f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsBuhid>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x1740,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsBuhid(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 5952
%4 = zext i1 %3 to i32
ret i32 %4
}
char *gettext__(msgid) const char *msgid;
{ return dgettext__(((void *)0), msgid); }


x86 assembly (clang, -O0):
<gettext__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <dgettext__@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettext__>:
push   %rax
mov    %rdi,%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <dgettext__@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @gettext__(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @dgettext__ to i32 (i8*, i8*, ...)*)(i8* null, i8* %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @gettext__(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @dgettext__ to i32 (i8*, i8*, ...)*)(i8* null, i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
double to_res53(int);
double to_res53_mix(uint32_t x, uint32_t y) {
  return to_res53(x | ((uint64_t)y << 32));
}


x86 assembly (clang, -O0):
<to_res53_mix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     %eax,%edi
call   1030 <to_res53@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_res53_mix>:
jmp    1030 <to_res53@plt>

LLVM IR (-O0):
define double @to_res53_mix(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %6, 32
%8 = or i32 %5, %7
%9 = call double @to_res53(i32 %8)
ret double %9
}

LLVM IR (-O2):
define double @to_res53_mix(i32 %0, i32 %1) {
%3 = tail call double @to_res53(i32 poison)
ret double %3
}
void EC_GROUP_set_curve_GF2m(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GROUP_set_curve_GF2m() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ onion_encode_block(unsigned char *, unsigned char const *);
void onion_encode(unsigned char *dst, const unsigned char *src) {
  onion_encode_block(&dst[0], &src[0]);
  onion_encode_block(&dst[8], &src[5]);
}


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

x86 assembly (clang, -O2):
<onion_encode>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <onion_encode_block@plt>
add    $0x8,%rbx
add    $0x5,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <onion_encode_block@plt>

LLVM IR (-O0):
define void @onion_encode(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = call i32 @onion_encode_block(i8* %6, i8* %8)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 8
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 5
%14 = call i32 @onion_encode_block(i8* %11, i8* %13)
ret void
}

LLVM IR (-O2):
define void @onion_encode(i8* %0, i8* %1) {
%3 = tail call i32 @onion_encode_block(i8* %0, i8* %1)
%4 = getelementptr inbounds i8, i8* %0, i64 8
%5 = getelementptr inbounds i8, i8* %1, i64 5
%6 = tail call i32 @onion_encode_block(i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cldrv_serialize(unsigned char *);
int /*<<< orphan*/ leddrv_geterrors(unsigned char *);
int cldrv_errors(void) {
  unsigned char led_errors[80];
  leddrv_geterrors(led_errors);
  cldrv_serialize(led_errors);
  return 0;
}


x86 assembly (clang, -O0):
<cldrv_errors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
call   1040 <leddrv_geterrors@plt>
lea    -0x50(%rbp),%rdi
call   1030 <cldrv_serialize@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cldrv_errors>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <leddrv_geterrors@plt>
mov    %rbx,%rdi
call   1030 <cldrv_serialize@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cldrv_errors() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @leddrv_geterrors(i8* %2)
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%5 = call i32 @cldrv_serialize(i8* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @cldrv_errors() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @leddrv_geterrors(i8* %2)
%4 = call i32 @cldrv_serialize(i8* %2)
ret i32 0
}
int get_npass(int n) {
  int nn = 0;
  while (n > 1) {
    nn++;
    n /= 2;
  }
  return nn;
}


x86 assembly (clang, -O0):
<get_npass>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1134 <get_npass+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <get_npass+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_npass>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111c <get_npass+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <get_npass+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_npass(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ message;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char message[81] = {0};
  printf("Enter a message: ");
  fgets(message, sizeof(message), stdin);
  reverse(message);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x51,%edx
call   1050 <memset@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
mov    $0x51,%esi
call   1060 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movb   $0x0,0x50(%rsp)
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x51,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter a message: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
store i32 0, i32* %1
%3 = bitcast [81 x i8]* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 81, i32 %6)
%8 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter a message: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 81, i32 %4)
%6 = call i32 @reverse(i8* %2)
ret i32 0
}
void UYVYToARGBRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToARGBRow_NEON() {
ret void
}
unsigned long long movdi_1(int a) { return 0xF0F00000LLU; }


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

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

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

LLVM IR (-O2):
define i64 @movdi_1(i32 %0) {
ret i64 4042260480
}
int kstrlen(const char *str) {
  int i = 0;
  while (str[i] != '\0')
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<kstrlen>:
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 <kstrlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <kstrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @kstrlen(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 @kstrlen(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
}
char _po_int2char(int i) {
  if (i < 10)
    return (char)(i + 48);
  return (char)(i + 55);
}


x86 assembly (clang, -O0):
<_po_int2char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    111f <_po_int2char+0x1f>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1128 <_po_int2char+0x28>
mov    -0x8(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_po_int2char>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @_po_int2char(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 48
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 55
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %14
14: ; preds = %10, %6
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @_po_int2char(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
/* Variables and functions */
int flash_image(void *, unsigned int, char *);
int flash_recovery_kernel(void *data, unsigned sz) {
  return flash_image(data, sz, "recovery");
}


x86 assembly (clang, -O0):
<flash_recovery_kernel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <flash_image@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_recovery_kernel>:
lea    0xee9(%rip),%rdx
jmp    1030 <flash_image@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"recovery\00"
define i32 @flash_recovery_kernel(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @flash_image(i8* %5, i32 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"recovery\00"
define i32 @flash_recovery_kernel(i8* %0, i32 %1) {
%3 = tail call i32 @flash_image(i8* %0, i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
void gdev_vsched_null_replenish_compute(struct gdev_device *gdev) {}


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

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

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

LLVM IR (-O2):
%struct.gdev_device = type opaque
define void @gdev_vsched_null_replenish_compute(%struct.gdev_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_syslog;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, int /*<<< orphan*/ *, int);
void setLogLevel(int level) { syscall(SYS_syslog, 8, NULL, level); }


x86 assembly (clang, -O0):
<setLogLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    $0x8,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLogLevel>:
mov    %edi,%ecx
mov    0x2edf(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%esi
xor    %edx,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_syslog = global i32 0
define void @setLogLevel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_syslog
%4 = load i32, i32* %2
%5 = call i32 @syscall(i32 %3, i32 8, i32* null, i32 %4)
ret void
}

LLVM IR (-O2):
@SYS_syslog = global i32 0
define void @setLogLevel(i32 %0) {
%2 = load i32, i32* @SYS_syslog
%3 = tail call i32 @syscall(i32 %2, i32 8, i32* null, i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ event;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xmap_event(void *_p) {
  return (unsigned long)((XEvent *)_p)->xmap.event;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xmap_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xmap_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
scalar_t__ fmod(double, double);
long double fmodl(long double x, long double y) {
  return (long double)fmod((double)x, (double)y);
}


x86 assembly (clang, -O0):
<fmodl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
call   1030 <fmod@plt>
mov    %rax,-0x28(%rbp)
fildll -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodl>:
sub    $0x18,%rsp
fldt   0x30(%rsp)
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
fstpl  (%rsp)
movsd  (%rsp),%xmm1
call   1030 <fmod@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call i64 @fmod(double %6, double %8)
%10 = sitofp i64 %9 to x86_fp80
ret x86_fp80 %10
}

LLVM IR (-O2):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call i64 @fmod(double %3, double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_RWLOCK;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock) {
  if (lock == NULL)
    return;
  *(unsigned int *)lock = 0;
  OPENSSL_free(lock);
  return;
}


x86 assembly (clang, -O0):
<CRYPTO_THREAD_lock_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <CRYPTO_THREAD_lock_free+0x1c>
jmp    113f <CRYPTO_THREAD_lock_free+0x2f>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <OPENSSL_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_THREAD_lock_free>:
test   %rdi,%rdi
je     1120 <CRYPTO_THREAD_lock_free+0x10>
movl   $0x0,(%rdi)
jmp    1030 <OPENSSL_free@plt>
ret

LLVM IR (-O0):
define void @CRYPTO_THREAD_lock_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32*, i32** %2
store i32 0, i32* %7
%8 = load i32*, i32** %2
%9 = call i32 @OPENSSL_free(i32* %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @CRYPTO_THREAD_lock_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
store i32 0, i32* %0
%4 = tail call i32 @OPENSSL_free(i32* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ LOG_USER;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  openlog("qt", 0, LOG_USER);
  syslog(LOG_INFO, "configure");
  closelog();
  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)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rdi
xor    %esi,%esi
call   1050 <openlog@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xe96(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x0,%al
call   1030 <closelog@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0xebf(%rip),%rdi
xor    %esi,%esi
call   1050 <openlog@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1040 <syslog@plt>
xor    %eax,%eax
call   1030 <closelog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"qt\00"
@LOG_USER = global i32 0
@LOG_INFO = global i32 0
@.str.1 = [10 x i8] c"configure\00"
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* @LOG_USER
%7 = call i32 @openlog(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 %6)
%8 = load i32, i32* @LOG_INFO
%9 = call i32 @syslog(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (...) @closelog()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"qt\00"
@LOG_USER = global i32 0
@LOG_INFO = global i32 0
@.str.1 = [10 x i8] c"configure\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @LOG_USER
%4 = tail call i32 @openlog(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 %3)
%5 = load i32, i32* @LOG_INFO
%6 = tail call i32 @syslog(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (...) @closelog()
ret i32 0
}
void print_hab_fail_codes(void) {}


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

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

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

LLVM IR (-O2):
define void @print_hab_fail_codes() {
ret void
}
void RSA_get_ex_new_index(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_get_ex_new_index() {
ret void
}
/* Variables and functions */
void *dummy(void *x) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @dummy(i8* nocapture readnone %0) {
ret i8* null
}
int ade7754_initialize_ring(struct iio_ring_buffer *ring) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define i32 @ade7754_initialize_ring(%struct.iio_ring_buffer* nocapture readnone %0) {
ret i32 0
}
char GetFavoriteMove(long long id) {
  switch ((int)(id % 3)) {
  case 0:
    return 'S';
  case 1:
    return 'P';
  case 2:
    return 'R';
  }
}


x86 assembly (clang, -O0):
<GetFavoriteMove>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movabs $0x5555555555555556,%rcx
55 55 55
imul   %rcx
mov    -0x20(%rbp),%rax
mov    %rdx,%rcx
mov    %ecx,%edx
shr    $0x3f,%rcx
add    %ecx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
je     1163 <GetFavoriteMove+0x63>
jmp    1141 <GetFavoriteMove+0x41>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
je     116c <GetFavoriteMove+0x6c>
jmp    1152 <GetFavoriteMove+0x52>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     1175 <GetFavoriteMove+0x75>
jmp    1179 <GetFavoriteMove+0x79>
movb   $0x53,-0x1(%rbp)
jmp    1179 <GetFavoriteMove+0x79>
movb   $0x50,-0x1(%rbp)
jmp    1179 <GetFavoriteMove+0x79>
movb   $0x52,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetFavoriteMove>:
movabs $0x5555555555555556,%rcx
55 55 55
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
add    %edx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%edi
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
lea    (%rax,%rax,2),%ecx
or     $0x50,%ecx
cmp    $0x2,%edi
mov    $0x52,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @GetFavoriteMove(i64 %0) {
%2 = alloca i8
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = srem i64 %4, 3
%6 = trunc i64 %5 to i32
switch i32 %6, label %10 [
i32 0, label %7
i32 1, label %8
i32 2, label %9
]
7: ; preds = %1
store i8 83, i8* %2
br label %10
8: ; preds = %1
store i8 80, i8* %2
br label %10
9: ; preds = %1
store i8 82, i8* %2
br label %10
10: ; preds = %7, %8, %9, %1
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @GetFavoriteMove(i64 %0) {
%2 = srem i64 %0, 3
%3 = trunc i64 %2 to i32
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i8 80, i8 83
%6 = icmp eq i32 %3, 2
%7 = select i1 %6, i8 82, i8 %5
ret i8 %7
}