xunge/DecIR huggingface dataset:
/* Variables and functions */
int atoi(char *);
char *par_getsl(char *, char *);
int par_geti(char *block, char *name) {
  char *pp = par_getsl(block, name);
  return atoi(pp);
}


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

x86 assembly (clang, -O2):
<par_geti>:
push   %rax
call   1030 <par_getsl@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>

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

LLVM IR (-O2):
define i32 @par_geti(i8* %0, i8* %1) {
%3 = tail call i8* @par_getsl(i8* %0, i8* %1)
%4 = tail call i32 @atoi(i8* %3)
ret i32 %4
}
main() {
  int i = 0;
  switch (i) {
  case 1:
    return 1;
  }
  switch (i) {
  case 1:
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    112f <main+0x2f>
jmp    1123 <main+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1147 <main+0x47>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    1147 <main+0x47>
jmp    1140 <main+0x40>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 1, label %4
]
4: ; preds = %0
store i32 1, i32* %1
br label %8
5: ; preds = %0
%6 = load i32, i32* %2
switch i32 %6, label %8 [
i32 1, label %7
]
7: ; preds = %5
store i32 1, i32* %1
br label %8
8: ; preds = %4, %7, %5
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fa_mpeg_round(float x) {
  int rx;
  if (x > 0) {
    rx = (int)(x + 0.4054);
  } else {
    rx = -1 * (int)(-x - 0.4054);
  }
  return rx;
}


x86 assembly (clang, -O0):
<fa_mpeg_round>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    113b <fa_mpeg_round+0x3b>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <fa_mpeg_round+0x6a>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea7(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
imul   $0xffffffff,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_mpeg_round>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1119 <fa_mpeg_round+0x19>
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret
cvtss2sd %xmm0,%xmm0
movsd  0xedb(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @fa_mpeg_round(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double %8, 4.054000e-01
%10 = fptosi double %9 to i32
store i32 %10, i32* %3
br label %18
11: ; preds = %1
%12 = load float, float* %2
%13 = fneg float %12
%14 = fpext float %13 to double
%15 = fsub double %14, 4.054000e-01
%16 = fptosi double %15 to i32
%17 = mul nsw i32 -1, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %11, %6
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @fa_mpeg_round(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fpext float %0 to double
%5 = fadd double %4, 4.054000e-01
%6 = fptosi double %5 to i32
br label %13
7: ; preds = %1
%8 = fneg float %0
%9 = fpext float %8 to double
%10 = fadd double %9, -4.054000e-01
%11 = fptosi double %10 to i32
%12 = sub nsw i32 0, %11
br label %13
13: ; preds = %7, %3
%14 = phi i32 [ %6, %3 ], [ %12, %7 ]
ret i32 %14
}
/* Variables and functions */
int strtol(char const *, char **, int);
const char *read_width(const char *fmt, int *width) {
  char *endptr = NULL;
  *width = strtol(fmt, &endptr, 10);
  return endptr;
}


x86 assembly (clang, -O0):
<read_width>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_width>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @read_width(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @strtol(i8* %0, i8** %3, i32 10)
store i32 %5, i32* %1
%6 = load i8*, i8** %3
ret i8* %6
}
int test_imm_54int8_reg(signed char val) {
  return ((val) & (0x54 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_54int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x54,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_54int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 84
%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_54int8_reg(i8 signext %0) {
%2 = and i8 %0, 84
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ft_swap(int *a, int *b) {
  *a = *a ^ *b;
  *b = *a ^ *b;
  *a = *a ^ *b;
}


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

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

LLVM IR (-O0):
define void @ft_swap(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = xor i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = xor i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = xor i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @ft_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_i2c1(void) {
  gpio_mode((struct gpio *)0x40010C00, 8, 3 | 8);
  gpio_mode((struct gpio *)0x40010C00, 9, 3 | 8);
}


x86 assembly (clang, -O0):
<gpio_i2c1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010c00,%edi
mov    $0x8,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
mov    $0x40010c00,%edi
mov    $0x9,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_i2c1>:
push   %rax
mov    $0x40010c00,%edi
mov    $0x8,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
mov    $0x40010c00,%edi
mov    $0x9,%esi
mov    $0xb,%edx
pop    %rax
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_i2c1() {
%1 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 8, i32 11)
%2 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 9, i32 11)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_i2c1() {
%1 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 8, i32 11)
%2 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 9, i32 11)
ret void
}
void test2() {
  int i = 0;
  double d = i;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to double
store double %4, double* %2
ret void
}

LLVM IR (-O2):
define void @test2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eng_keybacklight_test(int /*<<< orphan*/);
int /*<<< orphan*/ eng_lcdbacklight_test(int /*<<< orphan*/);
void backlight_off(void) {
  eng_lcdbacklight_test(0);
  eng_keybacklight_test(0);
}


x86 assembly (clang, -O0):
<backlight_off>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <eng_lcdbacklight_test@plt>
xor    %edi,%edi
call   1040 <eng_keybacklight_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<backlight_off>:
push   %rax
xor    %edi,%edi
call   1030 <eng_lcdbacklight_test@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <eng_keybacklight_test@plt>

LLVM IR (-O0):
define void @backlight_off() {
%1 = call i32 @eng_lcdbacklight_test(i32 0)
%2 = call i32 @eng_keybacklight_test(i32 0)
ret void
}

LLVM IR (-O2):
define void @backlight_off() {
%1 = tail call i32 @eng_lcdbacklight_test(i32 0)
%2 = tail call i32 @eng_keybacklight_test(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say();
int main() {
  say();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @say()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(int, char const *);
void print_alert(const char *str) { __console_tx_string(1, str); }


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

x86 assembly (clang, -O2):
<print_alert>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_alert(i8* %0) {
%2 = tail call i32 @__console_tx_string(i32 1, i8* %0)
ret void
}
void wpa_supplicant_global_ctrl_iface_deinit(
    struct ctrl_iface_global_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.ctrl_iface_global_priv = type opaque
define void @wpa_supplicant_global_ctrl_iface_deinit(%struct.ctrl_iface_global_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(size_t const);
int /*<<< orphan*/ memcpy(void *, char *, size_t const);
void sulong_swap(void *vp1, void *vp2, const size_t size) {
  char *buffer = (char *)malloc(size);
  memcpy(buffer, vp1, size);
  memcpy(vp1, vp2, size);
  memcpy(vp2, buffer, size);
  free(buffer);
}


x86 assembly (clang, -O0):
<sulong_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sulong_swap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r12,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @sulong_swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
%19 = load i8*, i8** %5
%20 = load i8*, i8** %7
%21 = load i64, i64* %6
%22 = call i32 @memcpy(i8* %19, i8* %20, i64 %21)
%23 = load i8*, i8** %7
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
define void @sulong_swap(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @malloc(i64 %2)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %2)
%7 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%8 = tail call i32 @memcpy(i8* %1, i8* %5, i64 %2)
%9 = tail call i32 @free(i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t inw(uint16_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @inw(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ integer_out();
void no_errors_thrown_when_no_presets() { integer_out(); }


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

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

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

LLVM IR (-O2):
define void @no_errors_thrown_when_no_presets() {
%1 = tail call i32 (...) @integer_out()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int dobldobl_sample_to_new_slices(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(635, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_sample_to_new_slices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x27b,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_sample_to_new_slices>:
mov    $0x27b,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @dobldobl_sample_to_new_slices() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 635, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @dobldobl_sample_to_new_slices() {
%1 = tail call i32 @_ada_use_c2phc(i32 635, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int usock_get_descriptor(long const);
int cl_get_descriptor(const long mtype) { return usock_get_descriptor(mtype); }


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

x86 assembly (clang, -O2):
<cl_get_descriptor>:
jmp    1030 <usock_get_descriptor@plt>

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

LLVM IR (-O2):
define i32 @cl_get_descriptor(i64 %0) {
%2 = tail call i32 @usock_get_descriptor(i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, double);
char *get_ratingstr(char *s, int decimals, double rating) {
  sprintf(s, "%.*f", decimals, rating);
  return s;
}


x86 assembly (clang, -O0):
<get_ratingstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ratingstr>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xee3(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.*f\00"
define i8* @get_ratingstr(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load double, double* %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8, double %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.*f\00"
define i8* @get_ratingstr(i8* returned writeonly %0, i32 %1, double %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, double %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ carrioncrawler(int);
int /*<<< orphan*/ niceprint(char *);
void domesticcrawler(void) {
  niceprint(
      "The characters encounter a domesticated carrion crawler scouring "
      "tunnels and caves for food. They can see that it is outfitted "
      "with a leather saddle and harness, though there's no sign of the "
      "rider. A character can approach and mount it without being attacked "
      "by succeeding on a DC 13 Wisom (Animal Handling) check. While in "
      "the saddle and harness, a rider can remain mounted on the crawler "
      "as it crawls across walls and ceilings.\n\n");
  carrioncrawler(1);
}


x86 assembly (clang, -O0):
<domesticcrawler>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <niceprint@plt>
mov    $0x1,%edi
call   1030 <carrioncrawler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<domesticcrawler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <niceprint@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <carrioncrawler@plt>

LLVM IR (-O0):
@.str = [433 x i8] c"The characters encounter a domesticated carrion crawler scouring tunnels and caves for food. They can see that it is outfitted with a leather saddle and harness, though there's no sign of the rider. A character can approach and mount it without being attacked by succeeding on a DC 13 Wisom (Animal Handling) check. While in the saddle and harness, a rider can remain mounted on the crawler as it crawls across walls and ceilings.\0A\0A\00"
define void @domesticcrawler() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @carrioncrawler(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [433 x i8] c"The characters encounter a domesticated carrion crawler scouring tunnels and caves for food. They can see that it is outfitted with a leather saddle and harness, though there's no sign of the rider. A character can approach and mount it without being attacked by succeeding on a DC 13 Wisom (Animal Handling) check. While in the saddle and harness, a rider can remain mounted on the crawler as it crawls across walls and ceilings.\0A\0A\00"
define void @domesticcrawler() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @carrioncrawler(i32 1)
ret void
}
int wps_validate_assoc_resp(const struct wpabuf *wps_ie) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_assoc_resp(%struct.wpabuf* nocapture readnone %0) {
ret i32 0
}
double bytes_to_Gbytes(double bytes) { return bytes / 1e9; }


x86 assembly (clang, -O0):
<bytes_to_Gbytes>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @bytes_to_Gbytes(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+09
ret double %4
}

LLVM IR (-O2):
define double @bytes_to_Gbytes(double %0) {
%2 = fdiv double %0, 1.000000e+09
ret double %2
}
void native_restore_fl(unsigned long flags) {
  __asm__ __volatile__("push %0 ; popf" : : "g"(flags) : "memory", "cc");
}


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

x86 assembly (clang, -O2):
<native_restore_fl>:
mov    %rdi,-0x8(%rsp)
push   -0x8(%rsp)
popf
ret

LLVM IR (-O0):
define void @native_restore_fl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @native_restore_fl(i64 %0) {
tail call void asm sideeffect "push $0 ; popf", "imr,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x1_setup() {
  char cmd[256];
  sprintf(cmd,
          "iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x1_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x1_setup>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x1_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x1_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
int closest10(int i) {
  int jj;
  jj = i + 5;
  jj /= 10;
  jj *= 10;
  return (jj);
}


x86 assembly (clang, -O0):
<closest10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<closest10>:
add    $0x5,%edi
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @closest10(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 5
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 10
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @closest10(i32 %0) {
%2 = add nsw i32 %0, 5
%3 = srem i32 %2, 10
%4 = sub i32 %2, %3
ret i32 %4
}
/* Type definitions */
struct string_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct string_s *);
int string_free_entry(void *entry_ptr) {
  struct string_s *entry = (struct string_s *)entry_ptr;
  free(entry);
  entry = NULL;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.string_s = type { i32 }
define i32 @string_free_entry(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.string_s*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.string_s*
store %struct.string_s* %5, %struct.string_s** %3
%6 = load %struct.string_s*, %struct.string_s** %3
%7 = call i32 @free(%struct.string_s* %6)
store %struct.string_s* null, %struct.string_s** %3
ret i32 0
}

LLVM IR (-O2):
%struct.string_s = type { i32 }
define i32 @string_free_entry(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.string_s*
%3 = tail call i32 @free(%struct.string_s* %2)
ret i32 0
}
int do_601() { return 601; }


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

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

LLVM IR (-O0):
define i32 @do_601() {
ret i32 601
}

LLVM IR (-O2):
define i32 @do_601() {
ret i32 601
}
void rcu_sched_qs(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @rcu_sched_qs(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  printf("hello,world !\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello,world !\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendWeaponPref();
void FlipCam_OnChange(void) { SendWeaponPref(); }


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

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

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

LLVM IR (-O2):
define void @FlipCam_OnChange() {
%1 = tail call i32 (...) @SendWeaponPref()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgbrcond(char *, int);
void cgbrle(int n) { cgbrcond("jle", n); }


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

x86 assembly (clang, -O2):
<cgbrle>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <cgbrcond@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"jle\00"
define void @cgbrle(i32 %0) {
%2 = tail call i32 @cgbrcond(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void yyerror(char const *msg) {}


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

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

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

LLVM IR (-O2):
define void @yyerror(i8* nocapture %0) {
ret void
}
extern char *strcat(char *dest, const char *src) { return dest; }


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

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

LLVM IR (-O0):
define i8* @strcat(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
ret i8* %5
}

LLVM IR (-O2):
define i8* @strcat(i8* readnone returned %0, i8* nocapture readnone %1) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ next_token(char);
void maybe_skip_comma(void) { next_token(','); }


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

x86 assembly (clang, -O2):
<maybe_skip_comma>:
mov    $0x2c,%edi
jmp    1030 <next_token@plt>

LLVM IR (-O0):
define void @maybe_skip_comma() {
%1 = call i32 @next_token(i8 signext 44)
ret void
}

LLVM IR (-O2):
define void @maybe_skip_comma() {
%1 = tail call i32 @next_token(i8 signext 44)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_stcl(int, int, void *);
void stcl(void *i) { __builtin_arm_stcl(1, 2, i); }


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

x86 assembly (clang, -O2):
<stcl>:
mov    %rdi,%rdx
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <__builtin_arm_stcl@plt>

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

LLVM IR (-O2):
define void @stcl(i8* %0) {
%2 = tail call i32 @__builtin_arm_stcl(i32 1, i32 2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, size_t);
size_t strlen(char *);
void delchar(char *p) {
  size_t len = strlen(p);
  memmove(p, p + 1, len + 1);
  *(p + len) = '\0';
}


x86 assembly (clang, -O0):
<delchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
call   1040 <memmove@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delchar>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r14
lea    0x1(%rbx),%rsi
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
call   1040 <memmove@plt>
movb   $0x0,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @delchar(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = add i64 %2, 1
%5 = tail call i32 @memmove(i8* %0, i8* %3, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %2
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test() { printf("normally\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"normally\00"
define void @test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StatLineFieldF(char *, char *, char *, double, int);
void StatLineF(char *label, char *units, char *format, double argleft,
               double argright) {
  StatLineFieldF(label, units, format, argleft, 0);
  StatLineFieldF(label, units, format, argright, 1);
}


x86 assembly (clang, -O0):
<StatLineF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
xor    %ecx,%ecx
call   1030 <StatLineFieldF@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%ecx
call   1030 <StatLineFieldF@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatLineF>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %ecx,%ecx
call   1030 <StatLineFieldF@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%ecx
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <StatLineFieldF@plt>

LLVM IR (-O0):
define void @StatLineF(i8* %0, i8* %1, i8* %2, double %3, double %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca double
%10 = alloca double
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store double %3, double* %9
store double %4, double* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load double, double* %9
%15 = call i32 @StatLineFieldF(i8* %11, i8* %12, i8* %13, double %14, i32 0)
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = load double, double* %10
%20 = call i32 @StatLineFieldF(i8* %16, i8* %17, i8* %18, double %19, i32 1)
ret void
}

LLVM IR (-O2):
define void @StatLineF(i8* %0, i8* %1, i8* %2, double %3, double %4) {
%6 = tail call i32 @StatLineFieldF(i8* %0, i8* %1, i8* %2, double %3, i32 0)
%7 = tail call i32 @StatLineFieldF(i8* %0, i8* %1, i8* %2, double %4, i32 1)
ret void
}
double KAPI_GetInternalVersion() { return 1.5; }


x86 assembly (clang, -O0):
<KAPI_GetInternalVersion>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @KAPI_GetInternalVersion() {
ret double 1.500000e+00
}

LLVM IR (-O2):
define double @KAPI_GetInternalVersion() {
ret double 1.500000e+00
}
void avformat_get_mov_audio_tags() {}


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

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

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

LLVM IR (-O2):
define void @avformat_get_mov_audio_tags() {
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int write(int, char const *, int);
ssize_t writec(int fd, const char c) {
  ssize_t nw;
  do {
    nw = write(fd, &c, 1);
    if (nw < 0)
      break;
  } while (nw < 1);
  return nw;
}


x86 assembly (clang, -O0):
<writec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1144 <writec+0x34>
jmp    1153 <writec+0x43>
jmp    1149 <writec+0x39>
cmpl   $0x1,-0xc(%rbp)
jl     1121 <writec+0x11>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writec>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%r14
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
test   %eax,%eax
je     1120 <writec+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @writec(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
br label %4
4: ; preds = %4, %2
%5 = call i32 @write(i32 %0, i8* %3, i32 1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %4, label %7
7: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char const *, char *);
int strlen(char const *);
void test_header(const char *title) {
  char row[] = "#####################################################";
  row[strlen(title) + 4] = '\0';
  printf("\n%s\n# %s #\n%s\n", row, title, row);
}


x86 assembly (clang, -O0):
<test_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x36,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x4,%eax
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x40(%rbp),%rcx
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_header>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x23232323232323,%rax
mov    %rax,0x2e(%rsp)
call   1030 <strlen@plt>
cltq
mov    %rsp,%rcx
movb   $0x0,0x4(%rax,%rcx,1)
lea    0xec6(%rip),%rdi
mov    %rcx,%rsi
mov    %rbx,%rdx
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_header.row = [54 x i8] c"#####################################################\00"
@.str = [15 x i8] c"\0A%s\0A# %s #\0A%s\0A\00"
define void @test_header(i8* %0) {
%2 = alloca i8*
%3 = alloca [54 x i8]
store i8* %0, i8** %2
%4 = bitcast [54 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [54 x i8], [54 x i8]* %3, i64 0, i64 %8
store i8 0, i8* %9
%10 = getelementptr inbounds [54 x i8], [54 x i8]* %3, i64 0, i64 0
%11 = load i8*, i8** %2
%12 = getelementptr inbounds [54 x i8], [54 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@__const.test_header.row = [54 x i8] c"#####################################################\00"
@.str = [15 x i8] c"\0A%s\0A# %s #\0A%s\0A\00"
define void @test_header(i8* %0) {
%2 = alloca [54 x i8]
%3 = getelementptr inbounds [54 x i8], [54 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [54 x i8], [54 x i8]* %2, i64 0, i64 %6
store i8 0, i8* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0, i8* %3)
ret void
}
void computeRates(double voi, double *states, double *rates,
                  double *variables) {
  rates[0] = 1.23;
  rates[1] = 7.89;
}


x86 assembly (clang, -O0):
<computeRates>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xee7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeRates>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @computeRates(double %0, double* %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %7
%10 = getelementptr inbounds double, double* %9, i64 0
store double 1.230000e+00, double* %10
%11 = load double*, double** %7
%12 = getelementptr inbounds double, double* %11, i64 1
store double 0x401F8F5C28F5C28F, double* %12
ret void
}

LLVM IR (-O2):
define void @computeRates(double %0, double* nocapture readnone %1, double* nocapture writeonly %2, double* nocapture readnone %3) {
%5 = bitcast double* %2 to <2 x double>*
store <2 x double> <double 1.230000e+00, double 0x401F8F5C28F5C28F>, <2 x double>* %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ swap32(int /*<<< orphan*/ const);
void memcpy_swap32(void *dst, const void *src, size_t n) {
  size_t i;
  for (i = 0; i < n; i++) {
    ((uint32_t *)dst)[i] = swap32(((const uint32_t *)src)[i]);
  }
}


x86 assembly (clang, -O0):
<memcpy_swap32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1168 <memcpy_swap32+0x58>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <swap32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <memcpy_swap32+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy_swap32>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <memcpy_swap32+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
call   1030 <swap32@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <memcpy_swap32+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @memcpy_swap32(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = bitcast i8* %1 to i32*
%7 = bitcast i8* %0 to i32*
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds i32, i32* %6, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @swap32(i32 %11)
%13 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 %12, i32* %13
%14 = add nuw i64 %9, 1
%15 = icmp eq i64 %14, %2
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void a() {
  printf("Function a()\n");
  system("date");
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Function a()\0A\00"
@.str.1 = [5 x i8] c"date\00"
define void @a() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"date\00"
@str = [13 x i8] c"Function a()\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}