xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ feed_sig(char);
void do_sigchld(int signo) { feed_sig('C'); }


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

x86 assembly (clang, -O2):
<do_sigchld>:
mov    $0x43,%edi
jmp    1030 <feed_sig@plt>

LLVM IR (-O0):
define void @do_sigchld(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @feed_sig(i8 signext 67)
ret void
}

LLVM IR (-O2):
define void @do_sigchld(i32 %0) {
%2 = tail call i32 @feed_sig(i8 signext 67)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *, int, char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/cwyang/h2o/refs/heads/master/"
               "include/h2o/h2o/memory.h",
               375, "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <h2o_mem_alloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x177,%esi
lea    0xf39(%rip),%rdx
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <h2o_mem_alloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf54(%rip),%rdx
mov    $0x177,%esi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cwyang/h2o/refs/heads/master/include/h2o/h2o/memory.h\00"
@.str.1 = [10 x i8] c"no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cwyang/h2o/refs/heads/master/include/h2o/h2o/memory.h\00"
@.str.1 = [10 x i8] c"no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int direct_equal(const void *v1, const void *v2) { return v1 == v2; }


x86 assembly (clang, -O0):
<direct_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<direct_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @direct_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @direct_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ println(char *);
int main(void) {
  println("Hello, World!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @println(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @println(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int crypto_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @crypto_init() {
ret i32 0
}
/* Type definitions */
struct gpiohandle_data {
  unsigned int *values;
};

/* Variables and functions */
int gpiotools_sets(char const *, unsigned int *, int, struct gpiohandle_data *);
int gpiotools_set(const char *device_name, unsigned int line,
                  unsigned int value) {
  struct gpiohandle_data data;
  unsigned int lines[] = {line};
  data.values[0] = value;
  return gpiotools_sets(device_name, lines, 1, &data);
}


x86 assembly (clang, -O0):
<gpiotools_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x1,%edx
lea    -0x18(%rbp),%rcx
call   1030 <gpiotools_sets@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
%struct.gpiohandle_data = type { i32* }
define i32 @gpiotools_set(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.gpiohandle_data
%8 = alloca [1 x i32]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = getelementptr inbounds [1 x i32], [1 x i32]* %8, i64 0, i64 0
%10 = load i32, i32* %5
store i32 %10, i32* %9
%11 = load i32, i32* %6
%12 = getelementptr inbounds %struct.gpiohandle_data, %struct.gpiohandle_data* %7, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 %11, i32* %14
%15 = load i8*, i8** %4
%16 = getelementptr inbounds [1 x i32], [1 x i32]* %8, i64 0, i64 0
%17 = call i32 @gpiotools_sets(i8* %15, i32* %16, i32 1, %struct.gpiohandle_data* %7)
ret i32 %17
}

LLVM IR (-O2):
int str_to_int(str, ip)
char *str;
int *ip;
{
  char c;
  if (sscanf(str, "%i%c", ip, &c) != 1) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<str_to_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xed1(%rip),%rsi
lea    -0x19(%rbp),%rcx
mov    $0x0,%al
call   1030 <sscanf@plt>
cmp    $0x1,%eax
je     114f <str_to_int+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <str_to_int+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_int>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
lea    0x7(%rsp),%rcx
xor    %eax,%eax
call   1030 <sscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%i%c\00"
define i32 @str_to_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
%7 = load i8*, i8** %4
%8 = load i32*, i32** %5
%9 = call i32 (i8*, i8*, ...) @sscanf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %8, i8* %6)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"%i%c\00"
define i32 @str_to_int(i8* nocapture %0, i32* %1) {
%3 = alloca i8
%4 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %3)
%5 = icmp ne i32 %4, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
void primary_commands(char command) {}


x86 assembly (clang, -O0):
<primary_commands>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @primary_commands(i8 signext %0) {
ret void
}
/* Variables and functions */
int testfunc(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testfunc() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXPECT_NEAR(float, float, float);
void ExpectFloatNear(float _a, float _b) { EXPECT_NEAR(_a, _b, 1e-5f); }


x86 assembly (clang, -O0):
<ExpectFloatNear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xecc(%rip),%xmm2
call   1030 <EXPECT_NEAR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExpectFloatNear>:
movss  0xee8(%rip),%xmm2
jmp    1030 <EXPECT_NEAR@plt>

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

LLVM IR (-O2):
define void @ExpectFloatNear(float %0, float %1) {
%3 = tail call i32 @EXPECT_NEAR(float %0, float %1, float 0x3EE4F8B580000000)
ret void
}
/* Variables and functions */
int imax(int, int);
int imin(int, int);
int iClip3(int low, int high, int x) {
  x = imax(x, low);
  x = imin(x, high);
  return x;
}


x86 assembly (clang, -O0):
<iClip3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <imax@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <imin@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iClip3>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
mov    %edx,%edi
call   1040 <imax@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <imin@plt>

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

LLVM IR (-O2):
define i32 @iClip3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @imax(i32 %2, i32 %0)
%5 = tail call i32 @imin(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, double);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d %d %lf\n", a / b, a % b, 1.0 * a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xea0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%esi
mov    %ecx,%eax
cltd
cvtsi2sd %ecx,%xmm0
idiv   %esi
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [11 x i8] c"%d %d %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = sdiv i32 %5, %6
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = srem i32 %8, %9
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = fmul double 1.000000e+00, %12
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %10, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [11 x i8] c"%d %d %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sdiv i32 %6, %7
%9 = srem i32 %6, %7
%10 = sitofp i32 %6 to double
%11 = sitofp i32 %7 to double
%12 = fdiv double %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, double %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TIM13_ISR();
int /*<<< orphan*/ TIM8_UP_ISR();
void TIM8_UP_TIM13_ISR(void) {
  TIM8_UP_ISR();
  TIM13_ISR();
}


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

x86 assembly (clang, -O2):
<TIM8_UP_TIM13_ISR>:
push   %rax
xor    %eax,%eax
call   1040 <TIM8_UP_ISR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <TIM13_ISR@plt>

LLVM IR (-O0):
define void @TIM8_UP_TIM13_ISR() {
%1 = call i32 (...) @TIM8_UP_ISR()
%2 = call i32 (...) @TIM13_ISR()
ret void
}

LLVM IR (-O2):
define void @TIM8_UP_TIM13_ISR() {
%1 = tail call i32 (...) @TIM8_UP_ISR()
%2 = tail call i32 (...) @TIM13_ISR()
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int _random_long_func(int, int);
int32_t _random_32_from_long(int32_t min, int32_t max) {
  int ret = _random_long_func((int)min, (int)max);
  return (int32_t)ret;
}


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

x86 assembly (clang, -O2):
<_random_32_from_long>:
push   %rax
call   1030 <_random_long_func@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @_random_32_from_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = call i32 @_random_long_func(i32 %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @_random_32_from_long(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i32 @_random_long_func(i32 %3, i32 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}
void av_fast_padded_mallocz() {}


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

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

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

LLVM IR (-O2):
define void @av_fast_padded_mallocz() {
ret void
}
int foo4(int i) {
  int j = 0;
  switch (i) {
  case 111:
    j = 111;
    break;
  case 0 ... 100:
    j = 1;
    break;
  case 222:
    j = 222;
    break;
  default:
    j = 42;
    break;
  case 501 ... 600:
    j = 5;
    break;
  }
  return j;
}


x86 assembly (clang, -O0):
<foo4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x6f,%eax
je     1135 <foo4+0x35>
jmp    1122 <foo4+0x22>
mov    -0xc(%rbp),%eax
sub    $0xde,%eax
je     1161 <foo4+0x61>
jmp    1185 <foo4+0x85>
movl   $0x6f,-0x8(%rbp)
jmp    119b <foo4+0x9b>
movl   $0x1,-0x8(%rbp)
jmp    119b <foo4+0x9b>
mov    -0xc(%rbp),%eax
sub    $0x0,%eax
cmp    $0x64,%eax
jbe    1141 <foo4+0x41>
jmp    116d <foo4+0x6d>
movl   $0xde,-0x8(%rbp)
jmp    119b <foo4+0x9b>
movl   $0x2a,-0x8(%rbp)
jmp    119b <foo4+0x9b>
movl   $0x5,-0x8(%rbp)
jmp    119b <foo4+0x9b>
mov    -0xc(%rbp),%eax
sub    $0x1f5,%eax
cmp    $0x63,%eax
jbe    1179 <foo4+0x79>
jmp    114d <foo4+0x4d>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo4>:
cmp    $0x6f,%edi
je     1113 <foo4+0x13>
cmp    $0xde,%edi
jne    1116 <foo4+0x16>
mov    $0xde,%eax
ret
mov    %edi,%eax
ret
lea    -0x1f5(%rdi),%ecx
mov    $0x5,%eax
cmp    $0x63,%ecx
ja     1127 <foo4+0x27>
ret
cmp    $0x65,%edi
mov    $0x1,%ecx
mov    $0x2a,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @foo4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %13 [
i32 111, label %5
i32 222, label %10
]
5: ; preds = %1
store i32 111, i32* %3
br label %16
6: ; preds = %7
store i32 1, i32* %3
br label %16
7: ; preds = %13
%8 = sub i32 %4, 0
%9 = icmp ule i32 %8, 100
br i1 %9, label %6, label %11
10: ; preds = %1
store i32 222, i32* %3
br label %16
11: ; preds = %7
store i32 42, i32* %3
br label %16
12: ; preds = %13
store i32 5, i32* %3
br label %16
13: ; preds = %1
%14 = sub i32 %4, 501
%15 = icmp ule i32 %14, 99
br i1 %15, label %12, label %7
16: ; preds = %12, %11, %10, %6, %5
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @foo4(i32 %0) {
switch i32 %0, label %6 [
i32 111, label %9
i32 222, label %5
]
2: ; preds = %6
%3 = icmp ult i32 %0, 101
%4 = select i1 %3, i32 1, i32 42
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = add i32 %0, -501
%8 = icmp ult i32 %7, 100
br i1 %8, label %9, label %2
9: ; preds = %2, %6, %1, %5
%10 = phi i32 [ 222, %5 ], [ %0, %1 ], [ %4, %2 ], [ 5, %6 ]
ret i32 %10
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int gf_mulinv(int);
uint8_t rj_sbox_inv(uint8_t x) {
  uint8_t y, sb;
  y = x ^ 0x63;
  sb = y = (y << 1) | (y >> 7);
  y = (y << 2) | (y >> 6);
  sb ^= y;
  y = (y << 3) | (y >> 5);
  sb ^= y;
  return gf_mulinv(sb);
}


x86 assembly (clang, -O0):
<rj_sbox_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x63,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
sar    $0x7,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    -0x8(%rbp),%ecx
sar    $0x6,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%ecx
sar    $0x5,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <gf_mulinv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rj_sbox_inv>:
mov    %edi,%eax
xor    $0x63,%eax
add    %eax,%eax
sar    $0x7,%edi
or     %eax,%edi
lea    0x0(,%rdi,4),%eax
mov    %edi,%ecx
sar    $0x6,%ecx
or     %eax,%ecx
xor    %ecx,%edi
lea    0x0(,%rcx,8),%eax
sar    $0x5,%ecx
or     %eax,%ecx
xor    %ecx,%edi
jmp    1030 <gf_mulinv@plt>

LLVM IR (-O0):
define i32 @rj_sbox_inv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = xor i32 %5, 99
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 1
%9 = load i32, i32* %3
%10 = ashr i32 %9, 7
%11 = or i32 %8, %10
store i32 %11, i32* %3
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = shl i32 %12, 2
%14 = load i32, i32* %3
%15 = ashr i32 %14, 6
%16 = or i32 %13, %15
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = xor i32 %18, %17
store i32 %19, i32* %4
%20 = load i32, i32* %3
%21 = shl i32 %20, 3
%22 = load i32, i32* %3
%23 = ashr i32 %22, 5
%24 = or i32 %21, %23
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = xor i32 %26, %25
store i32 %27, i32* %4
%28 = load i32, i32* %4
%29 = call i32 @gf_mulinv(i32 %28)
ret i32 %29
}

LLVM IR (-O2):
define i32 @rj_sbox_inv(i32 %0) {
%2 = shl i32 %0, 1
%3 = xor i32 %2, 198
%4 = ashr i32 %0, 7
%5 = or i32 %3, %4
%6 = shl i32 %5, 2
%7 = ashr i32 %5, 6
%8 = or i32 %6, %7
%9 = xor i32 %8, %5
%10 = shl i32 %8, 3
%11 = ashr i32 %8, 5
%12 = or i32 %10, %11
%13 = xor i32 %9, %12
%14 = tail call i32 @gf_mulinv(i32 %13)
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int cmn_getline_(int /*<<< orphan*/ *, char ***, int, int);
extern int cmn_getline(FILE *descr, char **line) {
  return cmn_getline_(descr, &line, 80 * sizeof(char), 20 * sizeof(char));
}


x86 assembly (clang, -O0):
<cmn_getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x50,%edx
mov    $0x14,%ecx
call   1030 <cmn_getline_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmn_getline>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x50,%edx
mov    $0x14,%ecx
call   1030 <cmn_getline_@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cmn_getline(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 = call i32 @cmn_getline_(i32* %5, i8*** %4, i32 80, i32 20)
ret i32 %6
}

LLVM IR (-O2):
define i32 @cmn_getline(i32* %0, i8** %1) {
%3 = alloca i8**
store i8** %1, i8*** %3
%4 = call i32 @cmn_getline_(i32* %0, i8*** %3, i32 80, i32 20)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xa0() {
  Assert_real((isprint(160) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              805, ("isprint should be 0 for 0xa0"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xa0>:
push   %rax
mov    $0xa0,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x325,%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 = [29 x i8] c"isprint should be 0 for 0xa0\00"
define void @t_isprint_0xa0() {
%1 = call i64 @isprint(i32 160)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 805, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa0\00"
define void @t_isprint_0xa0() {
%1 = tail call i64 @isprint(i32 160)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 805, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rand_uint32();
uint32_t rand_uint32_range_fast(uint32_t lo, uint32_t hi) {
  return (rand_uint32() % (hi - lo + 1)) + lo;
}


x86 assembly (clang, -O0):
<rand_uint32_range_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand_uint32@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_uint32_range_fast>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand_uint32@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_uint32_range_fast(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand_uint32()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rand_uint32_range_fast(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand_uint32()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
int f(int *restrict p, int *restrict q) { return 0; }


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

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

LLVM IR (-O0):
define i32 @f(i32* noalias %0, i32* noalias %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @f(i32* noalias nocapture readnone %0, i32* noalias nocapture readnone %1) {
ret i32 0
}
void force_eval_double(double x) { volatile double y = x; }


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

x86 assembly (clang, -O2):
<force_eval_double>:
movsd  %xmm0,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @force_eval_double(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
ret void
}
/* Variables and functions */
int count(int);
int test_double_digit() {
  return 9 == count(10) && 31 == count(45) && 80 == count(99);
}


x86 assembly (clang, -O0):
<test_double_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1030 <count@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x9,%ecx
cmp    %edx,%ecx
mov    %al,-0x1(%rbp)
jne    116d <test_double_digit+0x5d>
mov    $0x2d,%edi
call   1030 <count@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1f,%ecx
cmp    %edx,%ecx
mov    %al,-0x1(%rbp)
jne    116d <test_double_digit+0x5d>
mov    $0x63,%edi
call   1030 <count@plt>
mov    %eax,%ecx
mov    $0x50,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_double_digit>:
push   %rbx
mov    $0xa,%edi
call   1030 <count@plt>
xor    %ebx,%ebx
cmp    $0x9,%eax
jne    1143 <test_double_digit+0x33>
mov    $0x2d,%edi
call   1030 <count@plt>
cmp    $0x1f,%eax
jne    1143 <test_double_digit+0x33>
mov    $0x63,%edi
call   1030 <count@plt>
xor    %ebx,%ebx
cmp    $0x50,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_double_digit() {
%1 = call i32 @count(i32 10)
%2 = icmp eq i32 9, %1
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = call i32 @count(i32 45)
%5 = icmp eq i32 31, %4
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i32 @count(i32 99)
%8 = icmp eq i32 80, %7
br label %9
9: ; preds = %6, %3, %0
%10 = phi i1 [ false, %3 ], [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_double_digit() {
%1 = tail call i32 @count(i32 10)
%2 = icmp eq i32 %1, 9
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i32 @count(i32 45)
%5 = icmp eq i32 %4, 31
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @count(i32 99)
%8 = icmp eq i32 %7, 80
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 0, %3 ], [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ tolower(char);
char *strtolower(char *dest, const char *src) {
  char ch;
  char *begin = dest;
  while ((ch = *src)) {
    *dest++ = tolower(ch);
    src++;
  }
  *dest = 0;
  return begin;
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     1166 <strtolower+0x56>
movsbl -0x11(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <strtolower+0x18>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rsi),%al
mov    %rdi,%rbx
test   %al,%al
je     114a <strtolower+0x3a>
mov    %rsi,%r15
add    $0x1,%r15
mov    %r14,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%r15),%eax
add    $0x1,%r15
test   %al,%al
jne    1130 <strtolower+0x20>
movb   $0x0,(%rbx)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strtolower(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %1, %2 ]
%9 = tail call i32 @tolower(i8 signext %6)
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %0, %2 ], [ %11, %5 ]
store i8 0, i8* %16
ret i8* %0
}
void gtk_hruler_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hruler_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *x = strdup(s);
  if (x == NULL) {
    printf("[ERR] Not enough memory\n");
    exit(0);
  }
  return x;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <xstrdup+0x37>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"[ERR] Not enough memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@str = [24 x i8] c"[ERR] Not enough memory\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtpi32_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_movelh_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_ps();
__m128 __attribute__((__always___, __nodebug__))
_mm_cvtpi32x2_ps(__m64 a, __m64 b) {
  __m128 c;
  c = _mm_setzero_ps();
  c = _mm_cvtpi32_ps(c, b);
  c = _mm_movelh_ps(c, c);
  return _mm_cvtpi32_ps(c, a);
}


x86 assembly (clang, -O0):
<_mm_cvtpi32x2_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <_mm_setzero_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_cvtpi32_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <_mm_movelh_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_mm_cvtpi32_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cvtpi32x2_ps>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <_mm_setzero_ps@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <_mm_cvtpi32_ps@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1040 <_mm_movelh_ps@plt>
mov    %eax,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_cvtpi32_ps@plt>

LLVM IR (-O0):
define i32 @_mm_cvtpi32x2_ps(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @_mm_setzero_ps()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = call i32 @_mm_cvtpi32_ps(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %5
%12 = call i32 @_mm_movelh_ps(i32 %10, i32 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = call i32 @_mm_cvtpi32_ps(i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @_mm_cvtpi32x2_ps(i32 %0, i32 %1) {
%3 = tail call i32 (...) @_mm_setzero_ps()
%4 = tail call i32 @_mm_cvtpi32_ps(i32 %3, i32 %1)
%5 = tail call i32 @_mm_movelh_ps(i32 %4, i32 %4)
%6 = tail call i32 @_mm_cvtpi32_ps(i32 %5, i32 %0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
int main() {
  sleep(15);
  printf("PID: %d, Parent PID: %d\n", getpid(), getppid());
  exit(10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%edi
call   1070 <sleep@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf,%edi
call   1070 <sleep@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xe8e(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"PID: %d, Parent PID: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sleep(i32 15)
%3 = call i32 (...) @getpid()
%4 = call i32 (...) @getppid()
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @exit(i32 10)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"PID: %d, Parent PID: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @sleep(i32 15)
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (...) @getppid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = tail call i32 @exit(i32 10)
unreachable
}
unsigned int bit_set(unsigned int test, int n) {
  if (n < 0 || n > 32)
    return 0;
  return test | (1 << (31 - n));
}


x86 assembly (clang, -O0):
<bit_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     111e <bit_set+0x1e>
cmpl   $0x20,-0xc(%rbp)
jle    112a <bit_set+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1143 <bit_set+0x43>
mov    -0x8(%rbp),%eax
mov    $0x1f,%ecx
sub    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_set>:
mov    %esi,%ecx
mov    $0x80000000,%edx
shr    %cl,%edx
or     %edi,%edx
xor    %eax,%eax
cmp    $0x21,%esi
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @bit_set(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp slt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 32
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %18
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sub nsw i32 31, %14
%16 = shl i32 1, %15
%17 = or i32 %13, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %12, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @bit_set(i32 %0, i32 %1) {
%3 = icmp ugt i32 %1, 32
%4 = lshr i32 -2147483648, %1
%5 = or i32 %4, %0
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bar();
__attribute__((no, noclone)) void foo(void) {
  if (bar() != 0)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <bar@plt>
cmp    $0x0,%rax
je     113c <foo+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
test   %rax,%rax
jne    112f <foo+0xf>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i64 (...) @bar()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i64 (...) @bar()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret void
}
int ld_ble_mm2(long double *a1, long double *a2) {
  return !(__builtin_islessequal(*a1, *a2));
}


x86 assembly (clang, -O0):
<ld_ble_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ble_mm2>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_ble_mm2(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp ole x86_fp80 %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @ld_ble_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp ugt x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vd41();
int /*<<< orphan*/ take_struct_vd41(int /*<<< orphan*/);
void test_struct_vd41() { take_struct_vd41(return_struct_vd41()); }


x86 assembly (clang, -O0):
<test_struct_vd41>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <return_struct_vd41@plt>
mov    %eax,%edi
call   1030 <take_struct_vd41@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_vd41>:
push   %rax
xor    %eax,%eax
call   1040 <return_struct_vd41@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <take_struct_vd41@plt>

LLVM IR (-O0):
define void @test_struct_vd41() {
%1 = call i32 (...) @return_struct_vd41()
%2 = call i32 @take_struct_vd41(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vd41() {
%1 = tail call i32 (...) @return_struct_vd41()
%2 = tail call i32 @take_struct_vd41(i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_areas(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_areas>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_areas(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_areas(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
char *malloc(int);
char *make_flag() {
  char *flag = malloc(20);
  char flag_c = 'a';
  int i;
  for (i = 0; i < 20; i++) {
    flag[i] = flag_c++;
  }
  flag[19] = 0;
  return flag;
}


x86 assembly (clang, -O0):
<make_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movb   $0x61,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    115e <make_flag+0x4e>
mov    -0x9(%rbp),%dl
mov    %dl,%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <make_flag+0x21>
mov    -0x8(%rbp),%rax
movb   $0x0,0x13(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_flag>:
push   %rax
mov    $0x14,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movl   $0x737271,0x10(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @make_flag() {
%1 = tail call dereferenceable_or_null(20) i8* @malloc(i32 20)
%2 = bitcast i8* %1 to <16 x i8>*
store <16 x i8> <i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111, i8 112>, <16 x i8>* %2
%3 = getelementptr inbounds i8, i8* %1, i64 16
store i8 113, i8* %3
%4 = getelementptr inbounds i8, i8* %1, i64 17
store i8 114, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 18
store i8 115, i8* %5
%6 = getelementptr inbounds i8, i8* %1, i64 19
store i8 0, i8* %6
ret i8* %1
}
char *(wcheck_char_ptr)(char *to_check) { return to_check; }


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

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

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

LLVM IR (-O2):
define i8* @wcheck_char_ptr(i8* readnone returned %0) {
ret i8* %0
}
void UserPostOoaInitializationCalloutf(void) {}


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

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

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

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