xunge/DecIR huggingface dataset:
/* Variables and functions */
double rnd_uniform_d();
double rnd_uniform_rng_d(double low, double high) {
  return low + rnd_uniform_d() * (high - low);
}


x86 assembly (clang, -O0):
<rnd_uniform_rng_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rnd_uniform_d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_uniform_rng_d>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rnd_uniform_d@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @rnd_uniform_rng_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double (...) @rnd_uniform_d()
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = call double @llvm.fmuladd.f64(double %6, double %9, double %5)
ret double %10
}

LLVM IR (-O2):
define double @rnd_uniform_rng_d(double %0, double %1) {
%3 = tail call double (...) @rnd_uniform_d()
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %0)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char *, ...);
void assert_equals(int exp, int act, char *str) {
  if (exp != act) {
    printf("FAIL: %s exp=%d act=%d\n", str, exp, act);
    abort();
  } else {
    printf("PASS: %s\n", str);
  }
}


x86 assembly (clang, -O0):
<assert_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     115d <assert_equals+0x3d>
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_equals>:
cmp    %esi,%edi
jne    1135 <assert_equals+0x15>
lea    0xeed(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
jmp    1040 <printf@plt>
push   %rax
mov    %esi,%ecx
mov    %edi,%eax
lea    0xebf(%rip),%rdi
mov    %rdx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"FAIL: %s exp=%d act=%d\0A\00"
@.str.1 = [10 x i8] c"PASS: %s\0A\00"
define void @assert_equals(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12, i32 %13)
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %3
%17 = load i8*, i8** %6
%18 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"FAIL: %s exp=%d act=%d\0A\00"
@.str.1 = [10 x i8] c"PASS: %s\0A\00"
define void @assert_equals(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %0, i32 %1)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
%9 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ svga_readw_common(int /*<<< orphan*/, int, void *);
uint16_t svga_readw_linear(uint32_t addr, void *p) {
  return svga_readw_common(addr, 1, p);
}


x86 assembly (clang, -O0):
<svga_readw_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1030 <svga_readw_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svga_readw_linear>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <svga_readw_common@plt>

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

LLVM IR (-O2):
define i32 @svga_readw_linear(i32 %0, i8* %1) {
%3 = tail call i32 @svga_readw_common(i32 %0, i32 1, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int sock;
  printf("fileno(stdin) = %d\n", fileno(stdin));
  sock = socket(AF_INET, SOCK_DGRAM, 0);
  printf("sock = %d\n", sock);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1050 <socket@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1050 <socket@plt>
lea    0xea7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"fileno(stdin) = %d\0A\00"
@stdin = global i32 0
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str.1 = [11 x i8] c"sock = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stdin
%8 = call i32 @fileno(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @AF_INET
%11 = load i32, i32* @SOCK_DGRAM
%12 = call i32 @socket(i32 %10, i32 %11, i32 0)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"fileno(stdin) = %d\0A\00"
@stdin = global i32 0
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str.1 = [11 x i8] c"sock = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fileno(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @AF_INET
%7 = load i32, i32* @SOCK_DGRAM
%8 = tail call i32 @socket(i32 %6, i32 %7, i32 0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x3b() {
  Assert_real((isprint(59)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              300, ("isprint should be 1 for ;"));
}


x86 assembly (clang, -O0):
<t_isprint_0x3b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3b,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x12c,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x3b>:
push   %rax
mov    $0x3b,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x12c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for ;\00"
define void @t_isprint_0x3b() {
%1 = call i32 @isprint(i32 59)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for ;\00"
define void @t_isprint_0x3b() {
%1 = tail call i32 @isprint(i32 59)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_triplet(int a, int b, int c) {
  if (a * a + b * b == c * c)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_triplet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <is_triplet+0x38>
movl   $0x1,-0x4(%rbp)
jmp    113f <is_triplet+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_triplet>:
imul   %edi,%edi
imul   %esi,%esi
add    %edi,%esi
imul   %edx,%edx
xor    %eax,%eax
cmp    %edx,%esi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_triplet(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, %0
%5 = mul nsw i32 %1, %1
%6 = add nuw nsw i32 %5, %4
%7 = mul nsw i32 %2, %2
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
void pttsetptt(struct pttio *state, int pttx) {}


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

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

LLVM IR (-O0):
%struct.pttio = type opaque
define void @pttsetptt(%struct.pttio* %0, i32 %1) {
%3 = alloca %struct.pttio*
%4 = alloca i32
store %struct.pttio* %0, %struct.pttio** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.pttio = type opaque
define void @pttsetptt(%struct.pttio* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void fail(char *message) { printf("%s%s%s", "\033[1;31m", message, "\033[0m"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [8 x i8] c"\1B[1;31m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [8 x i8] c"\1B[1;31m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @fail(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct i8x_object {
  int dummy;
};
struct i8x_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ i8x_ob_unref(struct i8x_object *);
struct i8x_list *__attribute__((always_)) i8x_list_unref(struct i8x_list *x) {
  return (struct i8x_list *)i8x_ob_unref((struct i8x_object *)x);
}


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

x86 assembly (clang, -O2):
<i8x_list_unref>:
jmp    1030 <i8x_ob_unref@plt>

LLVM IR (-O0):
%struct.i8x_list = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_list* @i8x_list_unref(%struct.i8x_list* %0) {
%2 = alloca %struct.i8x_list*
store %struct.i8x_list* %0, %struct.i8x_list** %2
%3 = load %struct.i8x_list*, %struct.i8x_list** %2
%4 = bitcast %struct.i8x_list* %3 to %struct.i8x_object*
%5 = call i64 @i8x_ob_unref(%struct.i8x_object* %4)
%6 = inttoptr i64 %5 to %struct.i8x_list*
ret %struct.i8x_list* %6
}

LLVM IR (-O2):
%struct.i8x_list = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_list* @i8x_list_unref(%struct.i8x_list* %0) {
%2 = bitcast %struct.i8x_list* %0 to %struct.i8x_object*
%3 = tail call i64 @i8x_ob_unref(%struct.i8x_object* %2)
%4 = inttoptr i64 %3 to %struct.i8x_list*
ret %struct.i8x_list* %4
}
void av_format_set_data_codec() {}


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

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

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

LLVM IR (-O2):
define void @av_format_set_data_codec() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calcSpringEnergy(unsigned int);
scalar_t__ isSpringObject(unsigned int);
void calcObjectEnergy(unsigned int i) {
  if (isSpringObject(i)) {
    calcSpringEnergy(i);
  }
}


x86 assembly (clang, -O0):
<calcObjectEnergy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isSpringObject@plt>
cmp    $0x0,%rax
je     1145 <calcObjectEnergy+0x25>
mov    -0x4(%rbp),%edi
call   1040 <calcSpringEnergy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcObjectEnergy>:
push   %rbx
mov    %edi,%ebx
call   1030 <isSpringObject@plt>
test   %rax,%rax
je     1135 <calcObjectEnergy+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <calcSpringEnergy@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @calcObjectEnergy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isSpringObject(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @calcSpringEnergy(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @calcObjectEnergy(i32 %0) {
%2 = tail call i64 @isSpringObject(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @calcSpringEnergy(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
long getoutputcirclesize() { return (0); }


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

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

LLVM IR (-O0):
define i64 @getoutputcirclesize() {
ret i64 0
}

LLVM IR (-O2):
define i64 @getoutputcirclesize() {
ret i64 0
}
void listvoices(void) {}


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

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

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

LLVM IR (-O2):
define void @listvoices() {
ret void
}
void RTTestGuardedAlloc(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestGuardedAlloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int, double, double, double, double, double, double,
                     double, double, double, double, double, double, double,
                     double, double, double);
int main(void) {
  f(16, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
    14.0, 15.0, 16.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x10,%edi
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
movsd  0xed4(%rip),%xmm2
movsd  0xed4(%rip),%xmm3
movsd  0xed4(%rip),%xmm4
movsd  0xed4(%rip),%xmm5
movsd  0xed4(%rip),%xmm6
movsd  0xed4(%rip),%xmm7
movsd  0xed3(%rip),%xmm15
movsd  0xed2(%rip),%xmm14
movsd  0xed1(%rip),%xmm13
movsd  0xed0(%rip),%xmm12
movsd  0xecf(%rip),%xmm11
movsd  0xece(%rip),%xmm10
movsd  0xecd(%rip),%xmm9
movsd  0xecc(%rip),%xmm8
movsd  %xmm15,(%rsp)
movsd  %xmm14,0x8(%rsp)
movsd  %xmm13,0x10(%rsp)
movsd  %xmm12,0x18(%rsp)
movsd  %xmm11,0x20(%rsp)
movsd  %xmm10,0x28(%rsp)
movsd  %xmm9,0x30(%rsp)
movsd  %xmm8,0x38(%rsp)
call   1030 <f@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4030000000000000,%rsi
movabs $0x402e000000000000,%rax
movabs $0x402c000000000000,%rcx
movabs $0x402a000000000000,%rdx
movabs $0x4028000000000000,%r11
movabs $0x4026000000000000,%r10
movabs $0x4024000000000000,%r9
movabs $0x4022000000000000,%r8
movsd  0xe97(%rip),%xmm0
movsd  0xe97(%rip),%xmm1
movsd  0xe97(%rip),%xmm2
movsd  0xe97(%rip),%xmm3
movsd  0xe97(%rip),%xmm4
movsd  0xe97(%rip),%xmm5
movsd  0xe97(%rip),%xmm6
movsd  0xe97(%rip),%xmm7
mov    $0x10,%edi
push   %rsi
push   %rax
push   %rcx
push   %rdx
push   %r11
push   %r10
push   %r9
push   %r8
call   1030 <f@plt>
add    $0x40,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 16, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00, double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 1.300000e+01, double 1.400000e+01, double 1.500000e+01, double 1.600000e+01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 16, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00, double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 1.300000e+01, double 1.400000e+01, double 1.500000e+01, double 1.600000e+01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_flag(int, int);
void set_carry(bool set) { set_flag(4, set); }


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

x86 assembly (clang, -O2):
<set_carry>:
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <set_flag@plt>

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

LLVM IR (-O2):
define void @set_carry(i32 %0) {
%2 = tail call i32 @set_flag(i32 4, i32 %0)
ret void
}
int FnCompare_short(const void *v1, const void *v2) {
  const short *i1 = v1;
  const short *i2 = v2;
  if (*i1 < *i2)
    return (-1);
  else if (*i1 > *i2)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<FnCompare_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movswl (%rax),%eax
mov    -0x28(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jge    113e <FnCompare_short+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <FnCompare_short+0x67>
mov    -0x20(%rbp),%rax
movswl (%rax),%eax
mov    -0x28(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jle    1160 <FnCompare_short+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1167 <FnCompare_short+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FnCompare_short>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%ax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @FnCompare_short(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i16*
%7 = alloca i16*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i16*
store i16* %9, i16** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i16*
store i16* %11, i16** %7
%12 = load i16*, i16** %6
%13 = load i16, i16* %12
%14 = sext i16 %13 to i32
%15 = load i16*, i16** %7
%16 = load i16, i16* %15
%17 = sext i16 %16 to i32
%18 = icmp slt i32 %14, %17
br i1 %18, label %19, label %20
19: ; preds = %2
store i32 -1, i32* %3
br label %30
20: ; preds = %2
%21 = load i16*, i16** %6
%22 = load i16, i16* %21
%23 = sext i16 %22 to i32
%24 = load i16*, i16** %7
%25 = load i16, i16* %24
%26 = sext i16 %25 to i32
%27 = icmp sgt i32 %23, %26
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 1, i32* %3
br label %30
29: ; preds = %20
store i32 0, i32* %3
br label %30
30: ; preds = %29, %28, %19
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @FnCompare_short(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = bitcast i8* %1 to i16*
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = icmp slt i16 %5, %6
%8 = icmp sgt i16 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ M_StartMovie();
void Command_StartMovie_f(void) { M_StartMovie(); }


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

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

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

LLVM IR (-O2):
define void @Command_StartMovie_f() {
%1 = tail call i32 (...) @M_StartMovie()
ret void
}
int parse_column_define_packet(const char *buf) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @parse_column_define_packet(i8* nocapture readnone %0) {
ret i32 0
}
void foo158() {}


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

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

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

LLVM IR (-O2):
define void @foo158() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
void handle_ferr(char *fname, char *pname) {
  char buf[2 * PATH_MAX + sizeof("%s: error on %s") + 1];
  snprintf(buf, sizeof(buf), "%s: error on %s", pname, fname);
  perror(buf);
}


x86 assembly (clang, -O0):
<handle_ferr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
movslq %eax,%rcx
mov    %rcx,%rax
add    $0x11,%rax
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
add    $0x20,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    %eax,%esi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xe8a(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x28(%rbp),%rdi
call   1040 <perror@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_ferr>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rsi,%rcx
mov    %rdi,%r8
mov    0x2ebd(%rip),%rax
movslq (%rax),%rax
lea    (%rax,%rax,1),%rsi
add    $0x11,%esi
mov    %rsp,%rbx
add    %rax,%rax
add    $0x20,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@.str = [16 x i8] c"%s: error on %s\00"
define void @handle_ferr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i32, i32* @PATH_MAX
%8 = mul nsw i32 2, %7
%9 = sext i32 %8 to i64
%10 = add i64 %9, 16
%11 = add i64 %10, 1
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %5
%13 = alloca i8, i64 %11
store i64 %11, i64* %6
%14 = trunc i64 %11 to i32
%15 = load i8*, i8** %4
%16 = load i8*, i8** %3
%17 = call i32 @snprintf(i8* %13, i32 %14, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16)
%18 = call i32 @perror(i8* %13)
%19 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@.str = [16 x i8] c"%s: error on %s\00"
define void @handle_ferr(i8* %0, i8* %1) {
%3 = load i32, i32* @PATH_MAX
%4 = shl nsw i32 %3, 1
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, 17
%7 = alloca i8, i64 %6
%8 = trunc i64 %6 to i32
%9 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%10 = call i32 @perror(i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ogs_dbi_final();
int /*<<< orphan*/ ogs_sctp_final();
int /*<<< orphan*/ test_context_final();
void test_epc_final(void) {
  ogs_dbi_final();
  ogs_sctp_final();
  test_context_final();
}


x86 assembly (clang, -O0):
<test_epc_final>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ogs_dbi_final@plt>
mov    $0x0,%al
call   1040 <ogs_sctp_final@plt>
mov    $0x0,%al
call   1050 <test_context_final@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_epc_final>:
push   %rax
xor    %eax,%eax
call   1030 <ogs_dbi_final@plt>
xor    %eax,%eax
call   1040 <ogs_sctp_final@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_context_final@plt>

LLVM IR (-O0):
define void @test_epc_final() {
%1 = call i32 (...) @ogs_dbi_final()
%2 = call i32 (...) @ogs_sctp_final()
%3 = call i32 (...) @test_context_final()
ret void
}

LLVM IR (-O2):
define void @test_epc_final() {
%1 = tail call i32 (...) @ogs_dbi_final()
%2 = tail call i32 (...) @ogs_sctp_final()
%3 = tail call i32 (...) @test_context_final()
ret void
}
/* Variables and functions */
scalar_t__ integer(float);
int naturalNumber(float a) {
  bool result = 0;
  if (a > 0 && integer(a))
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<naturalNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1150 <naturalNumber+0x40>
movss  -0x4(%rbp),%xmm0
call   1030 <integer@plt>
cmp    $0x0,%rax
je     1150 <naturalNumber+0x40>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<naturalNumber>:
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112f <naturalNumber+0x1f>
push   %rax
call   1030 <integer@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @naturalNumber(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
store i32 0, i32* %3
%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 = call i64 @integer(float %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %3
br label %11
11: ; preds = %10, %6, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @naturalNumber(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i64 @integer(float %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int strlen(char *);
void remove_trailing_slash(char *str) {
  int len = strlen(str);
  if (str[len - 1] == '/')
    str[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<remove_trailing_slash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1153 <remove_trailing_slash+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_trailing_slash>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%rbx,1)
jne    1127 <remove_trailing_slash+0x17>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @remove_trailing_slash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 47
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
int bt_sys_close(int);
int _close_r(struct _reent *r, int file) { return bt_sys_close(file); }


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

x86 assembly (clang, -O2):
<_close_r>:
mov    %esi,%edi
jmp    1030 <bt_sys_close@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i32 @_close_r(%struct._reent* %0, i32 %1) {
%3 = alloca %struct._reent*
%4 = alloca i32
store %struct._reent* %0, %struct._reent** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @bt_sys_close(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define i32 @_close_r(%struct._reent* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @bt_sys_close(i32 %1)
ret i32 %3
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  scanf("%d", &i);
  if (i < 0) {
    printf("can't compute factrial number for minus number");
  } else {
    printf("%d", fact(i));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    116c <main+0x3c>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1184 <main+0x54>
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
js     1161 <main+0x31>
call   1040 <fact@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    116f <main+0x3f>
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [47 x i8] c"can't compute factrial number for minus number\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
br label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 @fact(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [47 x i8] c"can't compute factrial number for minus number\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %0
%9 = call i32 @fact(i32 %4)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int _offset;
};
typedef TYPE_1__ FILE;

/* Variables and functions */
extern int ftest(FILE *f) { return f->_offset; }


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @ftest(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @ftest(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
scalar_t__ errno;
int parse_status(char const *, char *, int *);
int /*<<< orphan*/ strtoull(char const *, char **, int /*<<< orphan*/);
int parse_u64(const char *optarg, uint64_t *val, int *cont) {
  char *end;
  errno = 0;
  *val = strtoull(optarg, &end, 0);
  return parse_status(optarg, end, cont);
}


x86 assembly (clang, -O0):
<parse_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtoull@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <parse_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_u64>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    0x2ea7(%rip),%rax
movq   $0x0,(%rax)
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <strtoull@plt>
mov    %eax,(%r15)
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <parse_status@plt>

LLVM IR (-O0):
@errno = global i64 0
define i32 @parse_u64(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i64 0, i64* @errno
%8 = load i8*, i8** %4
%9 = call i32 @strtoull(i8* %8, i8** %7, i32 0)
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i8*, i8** %4
%12 = load i8*, i8** %7
%13 = load i32*, i32** %6
%14 = call i32 @parse_status(i8* %11, i8* %12, i32* %13)
ret i32 %14
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @parse_u64(i8* %0, i32* nocapture writeonly %1, i32* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
store i64 0, i64* @errno
%6 = call i32 @strtoull(i8* %0, i8** %4, i32 0)
store i32 %6, i32* %1
%7 = load i8*, i8** %4
%8 = tail call i32 @parse_status(i8* %0, i8* %7, i32* %2)
ret i32 %8
}
void set_bit(unsigned long *bitmap, unsigned int bit) {
  bitmap[bit / (8 * sizeof(long))] |= 1UL << (bit % (8 * sizeof(long)));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x6,%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    %esi,%eax
shr    $0x3,%eax
mov    $0x1,%edx
shl    %cl,%rdx
and    $0xfffffff8,%eax
or     %rdx,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @set_bit(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = zext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = load i64*, i64** %3
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = udiv i64 %11, 64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = load i64, i64* %13
%15 = or i64 %14, %8
store i64 %15, i64* %13
ret void
}

LLVM IR (-O2):
define void @set_bit(i64* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = lshr i64 %3, 6
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
%9 = or i64 %8, %5
store i64 %9, i64* %7
ret void
}
void breakpt() {}


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

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

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

LLVM IR (-O2):
define void @breakpt() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void asc_event_set(uint32_t *p_asc_event_flags, uint32_t event) {
  *p_asc_event_flags |= event;
}


x86 assembly (clang, -O0):
<asc_event_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<asc_event_set>:
or     %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @asc_event_set(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = or i32 %3, %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char cadena[80 + 1];
  scanf("%s", &cadena[0]);
  printf("La cadena leida es %s. \n", cadena);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [25 x i8] c"La cadena leida es %s. \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [25 x i8] c"La cadena leida es %s. \0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;
typedef int /*<<< orphan*/ mp_bitcnt_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_mul_2exp(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void gmpint_lshift(mpz_t *rop, mpz_t *op, mp_bitcnt_t bits) {
  mpz_mul_2exp(*rop, *op, bits);
}


x86 assembly (clang, -O0):
<gmpint_lshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
call   1030 <mpz_mul_2exp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmpint_lshift>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <mpz_mul_2exp@plt>

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

LLVM IR (-O2):
define void @gmpint_lshift(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @mpz_mul_2exp(i32 %4, i32 %5, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _con_out(char);
int /*<<< orphan*/ pari(short);
void paripd(short r) {
  _con_out((char)'-');
  pari(r);
}


x86 assembly (clang, -O0):
<paripd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x2d,%edi
call   1030 <_con_out@plt>
movswl -0x2(%rbp),%edi
call   1040 <pari@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paripd>:
push   %rbx
mov    %edi,%ebx
mov    $0x2d,%edi
call   1030 <_con_out@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <pari@plt>

LLVM IR (-O0):
define void @paripd(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @_con_out(i8 signext 45)
%4 = load i16, i16* %2
%5 = call i32 @pari(i16 signext %4)
ret void
}

LLVM IR (-O2):
define void @paripd(i16 signext %0) {
%2 = tail call i32 @_con_out(i8 signext 45)
%3 = tail call i32 @pari(i16 signext %0)
ret void
}
/* Variables and functions */
scalar_t__ ERANGE;
scalar_t__ errno;
scalar_t__ strtol(char const *, char **, int);
int parse_int(const char *str, int *val) {
  char *tail;
  errno = 0;
  *val = (int)strtol(str, (char **)&tail, 10);
  if (*tail != '\0' || errno == ERANGE)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    0x2eb1(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1172 <parse_int+0x62>
mov    0x2e79(%rip),%rax
mov    (%rax),%rax
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%rax
jne    117e <parse_int+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    1185 <parse_int+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x2eba(%rip),%r14
movq   $0x0,(%r14)
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,(%rbx)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
setne  %al
mov    (%r14),%rcx
mov    0x2ea0(%rip),%rdx
cmp    (%rdx),%rcx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i64 0
@ERANGE = global i64 0
define i32 @parse_int(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 0, i64* @errno
%7 = load i8*, i8** %4
%8 = call i64 @strtol(i8* %7, i8** %6, i32 10)
%9 = trunc i64 %8 to i32
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i8*, i8** %6
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %2
%16 = load i64, i64* @errno
%17 = load i64, i64* @ERANGE
%18 = icmp eq i64 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %15, %2
store i32 1, i32* %3
br label %21
20: ; preds = %15
store i32 0, i32* %3
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@errno = global i64 0
@ERANGE = global i64 0
define i32 @parse_int(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i64 0, i64* @errno
%5 = call i64 @strtol(i8* %0, i8** %3, i32 10)
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
%10 = load i64, i64* @errno
%11 = load i64, i64* @ERANGE
%12 = icmp eq i64 %10, %11
%13 = select i1 %9, i1 true, i1 %12
%14 = zext i1 %13 to i32
ret i32 %14
}
int test_imm_C2int16_reg(short val) {
  return ((val) & (-0xC2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C2int16_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, -194
%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_C2int16_reg(i16 signext %0) {
%2 = and i16 %0, -194
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}