xunge/DecIR huggingface dataset:
void string_copy(char *s1, char *s2) {}


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

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

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

LLVM IR (-O2):
define void @string_copy(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_flower_number();
int main() {
  print_flower_number();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @print_flower_number()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_flower_number()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EF1(int *, char *, int *);
int Func(int Param, long long Param2) {
  int Result = Param;
  {
    {{{char c;
    int X;
    EF1(&Result, &c, &X);
  }
}
}
{
  char c;
  int X;
  EF1(&Result, &c, &X);
}
}
return Result;
}


x86 assembly (clang, -O0):
<Func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x15(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <EF1@plt>
lea    -0x14(%rbp),%rdi
lea    -0x1d(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   1030 <EF1@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rbx
lea    0x3(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <EF1@plt>
lea    0x2(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <EF1@plt>
mov    0x4(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @Func(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
%8 = bitcast i32* %3 to i8*
store i32 %0, i32* %3
%9 = bitcast i32* %5 to i8*
%10 = call i32 @EF1(i32* %3, i8* %4, i32* %5)
%11 = bitcast i32* %7 to i8*
%12 = call i32 @EF1(i32* %3, i8* %6, i32* %7)
%13 = load i32, i32* %3
ret i32 %13
}
void EVP_PKEY_delete_attr(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_delete_attr() {
ret void
}
int test_imm_46int16_reg(short val) {
  return ((val) & (-0x46 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_46int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffba,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_46int16_reg>:
test   $0xffba,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_46int16_reg(i16 signext %0) {
%2 = and i16 %0, -70
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void fn(void) {
  static int x;
  if (x > 10)
    return;
  else {
    printf("x = [%d]\n", x++);
    fn();
  }
}


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0xa,0x2f09(%rip)
jle    1136 <fn+0x16>
jmp    1158 <fn+0x38>
mov    0x2ef8(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2eed(%rip)
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
call   1030 <fn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn>:
push   %rbx
mov    0x2f15(%rip),%esi
cmp    $0xa,%esi
jg     114c <fn+0x3c>
lea    0xedd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%rsi),%eax
mov    %eax,0x2ef3(%rip)
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x2ee5(%rip),%esi
cmp    $0xb,%esi
jl     1130 <fn+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@fn.x = internal global i32 0
@.str = [10 x i8] c"x = [%d]\0A\00"
define void @fn() {
%1 = load i32, i32* @fn.x
%2 = icmp sgt i32 %1, 10
br i1 %2, label %3, label %4
3: ; preds = %0
br label %8
4: ; preds = %0
%5 = load i32, i32* @fn.x
%6 = add nsw i32 %5, 1
store i32 %6, i32* @fn.x
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %8
8: ; preds = %3, %4
ret void
}

LLVM IR (-O2):
@fn.x = internal unnamed_addr global i32 0
@.str = [10 x i8] c"x = [%d]\0A\00"
define void @fn() {
%1 = load i32, i32* @fn.x
%2 = icmp sgt i32 %1, 10
br i1 %2, label %9, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ %1, %0 ]
%5 = add nsw i32 %4, 1
store i32 %5, i32* @fn.x
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = load i32, i32* @fn.x
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TransformCounterC__0__CounterFrom__overflow();
void Msp430CounterC__0__Counter__overflow(void) {
  TransformCounterC__0__CounterFrom__overflow();
}


x86 assembly (clang, -O0):
<Msp430CounterC__0__Counter__overflow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <TransformCounterC__0__CounterFrom__overflow@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
ret void
}

LLVM IR (-O2):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
ret void
}
double max2(double a) {
  if (a > 0) {
    return a;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<max2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <max2+0x2a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1132 <max2+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max2>:
xorpd  %xmm1,%xmm1
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %3
store double %7, double* %2
br label %9
8: ; preds = %1
store double 0.000000e+00, double* %2
br label %9
9: ; preds = %8, %6
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
define double @max2(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = select i1 %2, double %0, double 0.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookinteger4array(int *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 4));
}


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

x86 assembly (clang, -O2):
<lookinteger4array>:
shl    $0x2,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookinteger4array(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 = bitcast i32* %5 to i8*
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 4
%9 = call i32 @lookNarray(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @lookinteger4array(i32* %0, i32 %1) {
%3 = bitcast i32* %0 to i8*
%4 = shl nsw i32 %1, 2
%5 = tail call i32 @lookNarray(i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int shift_handler(char **save) {
  write_instr(0x00);
  write_imm(0xE1);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<shift_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe1,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe1,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @shift_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 225)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @shift_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 225)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
int sched_get_priority_min(int policy) {
  (void)policy;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @sched_get_priority_min(i32 %0) {
ret i32 1
}
/* Variables and functions */
int ssgl_connect_to_lobby(char *, int);
int ssgl_gameclient_connect_to_lobby(char *ssgl_hostname) {
  return ssgl_connect_to_lobby(ssgl_hostname, 1);
}


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

x86 assembly (clang, -O2):
<ssgl_gameclient_connect_to_lobby>:
mov    $0x1,%esi
jmp    1030 <ssgl_connect_to_lobby@plt>

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

LLVM IR (-O2):
define i32 @ssgl_gameclient_connect_to_lobby(i8* %0) {
%2 = tail call i32 @ssgl_connect_to_lobby(i8* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void Alert(const char *message) { printf("ALERT: %s\n", message); }


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

x86 assembly (clang, -O2):
<Alert>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"ALERT: %s\0A\00"
define void @Alert(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void exitErr(const char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<exitErr>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @exitErr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @exitErr(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
scalar_t__ ioctl(int, int, void *);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int spic_ioctl(int fd, int ioctlno, void *param) {
  if (ioctl(fd, ioctlno, param) < 0) {
    syslog(LOG_INFO, "ioctl() failed!");
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<spic_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    116c <spic_ioctl+0x4c>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1040 <syslog@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <spic_ioctl+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spic_ioctl>:
push   %rax
call   1030 <ioctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1132 <spic_ioctl+0x12>
pop    %rcx
ret
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
call   1040 <syslog@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LOG_INFO = global i32 0
@.str = [16 x i8] c"ioctl() failed!\00"
define i32 @spic_ioctl(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = call i64 @ioctl(i32 %8, i32 %9, i8* %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i32, i32* @LOG_INFO
%15 = call i32 @syslog(i32 %14, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %17
16: ; preds = %3
store i32 0, i32* %4
br label %17
17: ; preds = %16, %13
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
@.str = [16 x i8] c"ioctl() failed!\00"
define i32 @spic_ioctl(i32 %0, i32 %1, i8* %2) {
%4 = tail call i64 @ioctl(i32 %0, i32 %1, i8* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @LOG_INFO
%8 = tail call i32 @syslog(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %3, %6
%10 = phi i32 [ -1, %6 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
int __length_dotted(unsigned char *, int);
int __length_question(unsigned char *message, int offset) {
  int i;
  i = __length_dotted(message, offset);
  return i + 4;
}


x86 assembly (clang, -O0):
<__length_question>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <__length_dotted@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__length_question>:
push   %rax
call   1030 <__length_dotted@plt>
add    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__length_question(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @__length_dotted(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 4
ret i32 %10
}

LLVM IR (-O2):
define i32 @__length_question(i8* %0, i32 %1) {
%3 = tail call i32 @__length_dotted(i8* %0, i32 %1)
%4 = add nsw i32 %3, 4
ret i32 %4
}
unsigned int RTP_get_ssrc(unsigned char *p) {
  return (((unsigned int)p[8]) << 24) + (((unsigned int)p[9]) << 16) +
         (((unsigned int)p[10]) << 8) + (unsigned int)p[11];
}


x86 assembly (clang, -O0):
<RTP_get_ssrc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x8(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xa(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xb(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_get_ssrc>:
mov    0x8(%rdi),%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @RTP_get_ssrc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 9
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = add i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 10
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = add i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 11
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = add i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @RTP_get_ssrc(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 9
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i8, i8* %0, i64 10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %10, %14
%16 = getelementptr inbounds i8, i8* %0, i64 11
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = or i32 %15, %18
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
char *strcat(char *dest, const char *src) {
  char *newDest = (dest + strlen(dest));
  strcpy(newDest, src);
  return dest;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret i8* %0
}
/* Variables and functions */
float powf(float, float);
float dds_scaling_dbm0f(float level) {
  return powf(10.0f, (level - (3.14f)) / 20.0f) * 32767.0f;
}


x86 assembly (clang, -O0):
<dds_scaling_dbm0f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xee2(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xed2(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
call   1030 <powf@plt>
movss  0xeb1(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dds_scaling_dbm0f>:
push   %rax
movaps %xmm0,%xmm1
addss  0xee4(%rip),%xmm1
divss  0xee0(%rip),%xmm1
movss  0xedc(%rip),%xmm0
call   1030 <powf@plt>
mulss  0xed3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dds_scaling_dbm0f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 0x40091EB860000000
%5 = fdiv float %4, 2.000000e+01
%6 = call float @powf(float 1.000000e+01, float %5)
%7 = fmul float %6, 3.276700e+04
ret float %7
}

LLVM IR (-O2):
define float @dds_scaling_dbm0f(float %0) {
%2 = fadd float %0, 0xC0091EB860000000
%3 = fdiv float %2, 2.000000e+01
%4 = tail call float @powf(float 1.000000e+01, float %3)
%5 = fmul float %4, 3.276700e+04
ret float %5
}
/* Variables and functions */
int _write_sysfs_int(char *, char *, int, int);
int /*<<< orphan*/ printf(char *, int, char *, char *);
int write_sysfs_int_and_verify(char *filename, char *basedir, int val) {
  printf("echo %d > %s/%s\n", val, basedir, filename);
  return _write_sysfs_int(filename, basedir, val, 1);
}


x86 assembly (clang, -O0):
<write_sysfs_int_and_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1040 <_write_sysfs_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_sysfs_int_and_verify>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
mov    %edx,%esi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1030 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <_write_sysfs_int@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"echo %d > %s/%s\0A\00"
define i32 @write_sysfs_int_and_verify(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8, i8* %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @_write_sysfs_int(i8* %11, i8* %12, i32 %13, i32 1)
ret i32 %14
}

LLVM IR (-O2):
@.str = [17 x i8] c"echo %d > %s/%s\0A\00"
define i32 @write_sysfs_int_and_verify(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1, i8* %0)
%5 = tail call i32 @_write_sysfs_int(i8* %0, i8* %1, i32 %2, i32 1)
ret i32 %5
}
/* Variables and functions */
char *getenv(char const *);
char *strchr(char *, char);
char *load(const char *what) {
  char *tmp, *tmp1;
  tmp1 = getenv(what);
  if (tmp1 == NULL)
    return NULL;
  tmp = strchr(tmp1, '=');
  if (tmp != NULL) {
    tmp++;
    tmp1 = tmp;
  }
  return tmp1;
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1151 <load+0x31>
movq   $0x0,-0x8(%rbp)
jmp    118a <load+0x6a>
mov    -0x20(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1182 <load+0x62>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
push   %rbx
call   1030 <getenv@plt>
test   %rax,%rax
je     114b <load+0x2b>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rbx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @load(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @getenv(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* null, i8** %2
br label %22
11: ; preds = %1
%12 = load i8*, i8** %5
%13 = call i8* @strchr(i8* %12, i8 signext 61)
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8*, i8** %4
store i8* %19, i8** %5
br label %20
20: ; preds = %16, %11
%21 = load i8*, i8** %5
store i8* %21, i8** %2
br label %22
22: ; preds = %20, %10
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @load(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i8* @strchr(i8* %2, i8 signext 61)
%6 = icmp eq i8* %5, null
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = select i1 %6, i8* %2, i8* %7
br label %9
9: ; preds = %1, %4
%10 = phi i8* [ %8, %4 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ tkh_timeval_normalize(struct timeval *);
void tkh_timeval_minus_eq(struct timeval *tv,
                          const struct timeval *subtract_me) {
  tv->tv_sec -= subtract_me->tv_sec;
  tv->tv_usec -= subtract_me->tv_usec;
  tkh_timeval_normalize(tv);
}


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

x86 assembly (clang, -O2):
<tkh_timeval_minus_eq>:
movdqu (%rsi),%xmm0
movdqu (%rdi),%xmm1
psubq  %xmm0,%xmm1
movdqu %xmm1,(%rdi)
jmp    1030 <tkh_timeval_normalize@plt>

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define void @tkh_timeval_minus_eq(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sub nsw i64 %10, %7
store i64 %11, i64* %9
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%14 = load i64, i64* %13
%15 = load %struct.timeval*, %struct.timeval** %3
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%17 = load i64, i64* %16
%18 = sub nsw i64 %17, %14
store i64 %18, i64* %16
%19 = load %struct.timeval*, %struct.timeval** %3
%20 = call i32 @tkh_timeval_normalize(%struct.timeval* %19)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define void @tkh_timeval_minus_eq(%struct.timeval* %0, %struct.timeval* nocapture %1) {
%3 = bitcast %struct.timeval* %1 to <2 x i64>*
%4 = load <2 x i64>, <2 x i64>* %3
%5 = bitcast %struct.timeval* %0 to <2 x i64>*
%6 = load <2 x i64>, <2 x i64>* %5
%7 = sub nsw <2 x i64> %6, %4
%8 = bitcast %struct.timeval* %0 to <2 x i64>*
store <2 x i64> %7, <2 x i64>* %8
%9 = tail call i32 @tkh_timeval_normalize(%struct.timeval* %0)
ret void
}
void nsvg__xformIdentity(float *t) {
  t[0] = 1.0f;
  t[1] = 0.0f;
  t[2] = 0.0f;
  t[3] = 1.0f;
  t[4] = 0.0f;
  t[5] = 0.0f;
}


x86 assembly (clang, -O0):
<nsvg__xformIdentity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xec4(%rip),%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__xformIdentity>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movq   $0x0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @nsvg__xformIdentity(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 1.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 3
store float 1.000000e+00, float* %10
%11 = load float*, float** %2
%12 = getelementptr inbounds float, float* %11, i64 4
store float 0.000000e+00, float* %12
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 5
store float 0.000000e+00, float* %14
ret void
}

LLVM IR (-O2):
define void @nsvg__xformIdentity(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float>* %2
%3 = getelementptr inbounds float, float* %0, i64 4
store float 0.000000e+00, float* %3
%4 = getelementptr inbounds float, float* %0, i64 5
store float 0.000000e+00, float* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Triangle166(long, long, long, long, long, long,
                               unsigned long, unsigned long);
void triangle(long x1, long y1, long x2, long y2, long x3, long y3,
              unsigned long cfg, unsigned long cbg) {
  Triangle166(x1, y1, x2, y2, x3, y3, cfg, cbg);
}


x86 assembly (clang, -O0):
<triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
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)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <Triangle166@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle>:
jmp    1030 <Triangle166@plt>

LLVM IR (-O0):
define void @triangle(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7) {
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
store i64 %0, i64* %9
store i64 %1, i64* %10
store i64 %2, i64* %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store i64 %5, i64* %14
store i64 %6, i64* %15
store i64 %7, i64* %16
%17 = load i64, i64* %9
%18 = load i64, i64* %10
%19 = load i64, i64* %11
%20 = load i64, i64* %12
%21 = load i64, i64* %13
%22 = load i64, i64* %14
%23 = load i64, i64* %15
%24 = load i64, i64* %16
%25 = call i32 @Triangle166(i64 %17, i64 %18, i64 %19, i64 %20, i64 %21, i64 %22, i64 %23, i64 %24)
ret void
}

LLVM IR (-O2):
define void @triangle(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7) {
%9 = tail call i32 @Triangle166(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
void timer_stop(char *string) { clock_t finish = clock(); }


x86 assembly (clang, -O0):
<timer_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @timer_stop(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @clock()
ret void
}
void atomic_pause() { __asm__ __volatile__("pause"); }


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

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

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

LLVM IR (-O2):
define void @atomic_pause() {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct evhttp_request {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _serveFileErr(struct evhttp_request *, char *);
void serveFilePlugin(struct evhttp_request *req) {
  _serveFileErr(req, "WEB_PLUGIN_DIR not provided at compile time.");
  return;
}


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

x86 assembly (clang, -O2):
<serveFilePlugin>:
lea    0xee9(%rip),%rsi
jmp    1030 <_serveFileErr@plt>

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
@.str = [45 x i8] c"WEB_PLUGIN_DIR not provided at compile time.\00"
define void @serveFilePlugin(%struct.evhttp_request* %0) {
%2 = alloca %struct.evhttp_request*
store %struct.evhttp_request* %0, %struct.evhttp_request** %2
%3 = load %struct.evhttp_request*, %struct.evhttp_request** %2
%4 = call i32 @_serveFileErr(%struct.evhttp_request* %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
@.str = [45 x i8] c"WEB_PLUGIN_DIR not provided at compile time.\00"
define void @serveFilePlugin(%struct.evhttp_request* %0) {
%2 = tail call i32 @_serveFileErr(%struct.evhttp_request* %0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
void link_error() {}


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

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

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

LLVM IR (-O2):
define void @link_error() {
ret void
}
void _Jv_CheckCast() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_CheckCast() {
ret void
}
int HelpItem41(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem41() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int code) {
  printf("Usage: ftw [options] <dir>\n");
  exit(code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Usage: ftw [options] <dir>\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"Usage: ftw [options] <dir>\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void default_panic_handler(int tag) {
  printf("Panic: Uncaught exception / no handler for: %d\n", tag);
  fflush(stderr);
  fflush(stdout);
  abort();
}


x86 assembly (clang, -O0):
<default_panic_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<default_panic_handler>:
push   %rax
mov    %edi,%esi
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Panic: Uncaught exception / no handler for: %d\0A\00"
@stderr = global i32 0
@stdout = global i32 0
define void @default_panic_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [48 x i8] c"Panic: Uncaught exception / no handler for: %d\0A\00"
@stderr = global i32 0
@stdout = global i32 0
define void @default_panic_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = tail call i32 (...) @abort()
unreachable
}
void RTLinuxSysFsReadDevNumFileV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLinuxSysFsReadDevNumFileV() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char const *);
int /*<<< orphan*/ strlen(char const *);
char *strdup(const char *str) {
  char *ret = (char *)malloc(strlen(str));
  strcpy(ret, str);
  return ret;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void g_key_file_to_data() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_to_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ die_errno(int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
extern void die_memory(void) {
  errno = ENOMEM;
  die_errno(NULL);
}


x86 assembly (clang, -O0):
<die_memory>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb4(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <die_errno@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<die_memory>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2eb8(%rip),%rcx
mov    %eax,(%rcx)
xor    %edi,%edi
jmp    1030 <die_errno@plt>

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define void @die_memory() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
%2 = call i32 @die_errno(i32* null)
ret void
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define void @die_memory() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
%2 = tail call i32 @die_errno(i32* null)
ret void
}
_Bool SignalingGreater(float f1, float f2) { return f1 > f2; }


x86 assembly (clang, -O0):
<SignalingGreater>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SignalingGreater>:
ucomiss %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @SignalingGreater(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @SignalingGreater(float %0, float %1) {
%3 = fcmp ogt float %0, %1
ret i1 %3
}
void Matrix_Free_Old(int intHeight, unsigned char ***pMat) {
  int i;
  for (i = 0; i <= intHeight - 1; i++)
    free((*pMat)[i]);
  free(*pMat);
  printf("simple matrix old memory free\n");
}


x86 assembly (clang, -O0):
<Matrix_Free_Old>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1169 <Matrix_Free_Old+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <Matrix_Free_Old+0x16>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Matrix_Free_Old>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1155 <Matrix_Free_Old+0x35>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rax
mov    (%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <Matrix_Free_Old+0x20>
mov    (%r14),%rdi
call   1030 <free@plt>
lea    0xe9c(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"simple matrix old memory free\0A\00"
define void @Matrix_Free_Old(i32 %0, i8*** %1) {
%3 = alloca i32
%4 = alloca i8***
%5 = alloca i32
store i32 %0, i32* %3
store i8*** %1, i8**** %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = icmp sle i32 %7, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i8***, i8**** %4
%13 = load i8**, i8*** %12
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = load i8***, i8**** %4
%23 = load i8**, i8*** %22
%24 = bitcast i8** %23 to i8*
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"simple matrix old memory free\00"
define void @Matrix_Free_Old(i32 %0, i8*** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = load i8**, i8*** %1
%9 = getelementptr inbounds i8*, i8** %8, i64 %7
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i8*** %1 to i8**
%15 = load i8*, i8** %14
tail call void @free(i8* %15)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *dup_mem(char *, scalar_t__);
scalar_t__ strlen(char *);
void *copy_of(char *s) { return dup_mem(s, strlen(s) + 1); }


x86 assembly (clang, -O0):
<copy_of>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1030 <dup_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_of>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <dup_mem@plt>

LLVM IR (-O0):
define i8* @copy_of(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @dup_mem(i8* %3, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @copy_of(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @dup_mem(i8* %0, i64 %3)
ret i8* %4
}
/* Variables and functions */
int foo(int);
int bar(int arg) { return foo(5); }


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

x86 assembly (clang, -O2):
<bar>:
mov    $0x5,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 @foo(i32 5)
ret i32 %2
}