xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ underline(char *);
int main(void) {
  underline("This Year's Starting Line-Up");
  getchar();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"This Year's Starting Line-Up\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @underline(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"This Year's Starting Line-Up\00"
define i32 @main() {
%1 = tail call i32 @underline(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void show(const char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @show(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int gmx_xpm2ps(int, char **);
int main(int argc, char *argv[]) { return gmx_xpm2ps(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_xpm2ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <gmx_xpm2ps@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_xpm2ps(i32 %0, i8** %1)
ret i32 %3
}
int check_overflow(int x, int y) {
  int tot = x * y;
  return !x || tot / x == y;
}


x86 assembly (clang, -O0):
<check_overflow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
je     1133 <check_overflow+0x33>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    -0x8(%rbp),%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @check_overflow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = sdiv i32 %12, %13
%15 = load i32, i32* %4
%16 = icmp eq i32 %14, %15
br label %17
17: ; preds = %11, %2
%18 = phi i1 [ true, %2 ], [ %16, %11 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @check_overflow(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ autovars(int, int);
int /*<<< orphan*/ foo();
int /*<<< orphan*/ init0();
int /*<<< orphan*/ localscopes(int /*<<< orphan*/);
int main() {
  init0();
  foo();
  autovars(5, 6);
  localscopes(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <init0@plt>
mov    $0x0,%al
call   1050 <foo@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <autovars@plt>
xor    %edi,%edi
call   1040 <localscopes@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <init0@plt>
xor    %eax,%eax
call   1050 <foo@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <autovars@plt>
xor    %edi,%edi
call   1040 <localscopes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @init0()
%2 = call i32 (...) @foo()
%3 = call i32 @autovars(i32 5, i32 6)
%4 = call i32 @localscopes(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init0()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 @autovars(i32 5, i32 6)
%4 = tail call i32 @localscopes(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void k(int x) { fprintf(stderr, "%c%d\n", 'k', x); }


x86 assembly (clang, -O0):
<k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xed2(%rip),%rsi
mov    $0x6b,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k>:
mov    %edi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0x6b,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @k(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 107, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @k(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 107, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int /*<<< orphan*/);
int main(int argc, char **argv) { mkdir("/tmp/path", 0); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"/tmp/path\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/tmp/path\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_hl(int);
void opcb_fe() { set_hl(7); }


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

x86 assembly (clang, -O2):
<opcb_fe>:
mov    $0x7,%edi
jmp    1030 <set_hl@plt>

LLVM IR (-O0):
define void @opcb_fe() {
%1 = call i32 @set_hl(i32 7)
ret void
}

LLVM IR (-O2):
define void @opcb_fe() {
%1 = tail call i32 @set_hl(i32 7)
ret void
}
/* Type definitions */
struct state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pop_state();
int /*<<< orphan*/ push_state(struct state *);
void change_state(struct state *new_state) {
  pop_state();
  push_state(new_state);
}


x86 assembly (clang, -O0):
<change_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pop_state@plt>
mov    -0x8(%rbp),%rdi
call   1040 <push_state@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_state>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <pop_state@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <push_state@plt>

LLVM IR (-O0):
%struct.state = type { i32 }
define void @change_state(%struct.state* %0) {
%2 = alloca %struct.state*
store %struct.state* %0, %struct.state** %2
%3 = call i32 (...) @pop_state()
%4 = load %struct.state*, %struct.state** %2
%5 = call i32 @push_state(%struct.state* %4)
ret void
}

LLVM IR (-O2):
%struct.state = type { i32 }
define void @change_state(%struct.state* %0) {
%2 = tail call i32 (...) @pop_state()
%3 = tail call i32 @push_state(%struct.state* %0)
ret void
}
void RGBAToUVRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RGBAToUVRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void fmterr(int x) {
  fprintf(stderr, "unknown error %d\n", x);
  exit(-1);
}


x86 assembly (clang, -O0):
<fmterr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fmterr>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"unknown error %d\0A\00"
define void @fmterr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"unknown error %d\0A\00"
define void @fmterr(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ saa7114_read_reg(int, unsigned char *);
int saa7114_decoder_detect_macrovision(void) {
  unsigned char macrovision = 0xff;
  saa7114_read_reg(0x1F, &macrovision);
  return ((macrovision & 0x02) >> 1);
}


x86 assembly (clang, -O0):
<saa7114_decoder_detect_macrovision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0xff,-0x1(%rbp)
mov    $0x1f,%edi
lea    -0x1(%rbp),%rsi
call   1030 <saa7114_read_reg@plt>
movzbl -0x1(%rbp),%eax
and    $0x2,%eax
sar    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saa7114_decoder_detect_macrovision>:
push   %rax
movb   $0xff,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1f,%edi
call   1030 <saa7114_read_reg@plt>
movzbl 0x7(%rsp),%eax
shr    %eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @saa7114_decoder_detect_macrovision() {
%1 = alloca i8
store i8 -1, i8* %1
%2 = call i32 @saa7114_read_reg(i32 31, i8* %1)
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = and i32 %4, 2
%6 = ashr i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @saa7114_decoder_detect_macrovision() {
%1 = alloca i8
store i8 -1, i8* %1
%2 = call i32 @saa7114_read_reg(i32 31, i8* %1)
%3 = load i8, i8* %1
%4 = lshr i8 %3, 1
%5 = and i8 %4, 1
%6 = zext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __utac_acc__Specification1_spec__1();
int /*<<< orphan*/ __utac_acc__Specification1_spec__4();
int /*<<< orphan*/ test();
void runTest(void) {
  {
    {
      __utac_acc__Specification1_spec__1();
      test();
      __utac_acc__Specification1_spec__4();
    }
    return;
  }
}


x86 assembly (clang, -O0):
<runTest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <__utac_acc__Specification1_spec__1@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1040 <__utac_acc__Specification1_spec__4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<runTest>:
push   %rax
xor    %eax,%eax
call   1030 <__utac_acc__Specification1_spec__1@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__utac_acc__Specification1_spec__4@plt>

LLVM IR (-O0):
define void @runTest() {
%1 = call i32 (...) @__utac_acc__Specification1_spec__1()
%2 = call i32 (...) @test()
%3 = call i32 (...) @__utac_acc__Specification1_spec__4()
ret void
}

LLVM IR (-O2):
define void @runTest() {
%1 = tail call i32 (...) @__utac_acc__Specification1_spec__1()
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @__utac_acc__Specification1_spec__4()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
size_t artio_type_size(int type) {
  size_t t_len = 0;
  switch (type) {
  case 0:
  case 1:
    t_len = sizeof(char);
    break;
  case 2:
    t_len = sizeof(int32_t);
    break;
  case 3:
    t_len = sizeof(float);
    break;
  case 4:
    t_len = sizeof(double);
    break;
  case 5:
    t_len = sizeof(int64_t);
    break;
  default:
    t_len = (size_t)-1;
    break;
  }
  return t_len;
}


x86 assembly (clang, -O0):
<artio_type_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x5,%rax
ja     1175 <artio_type_size+0x75>
mov    -0x18(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x1,-0x10(%rbp)
jmp    117d <artio_type_size+0x7d>
movq   $0x4,-0x10(%rbp)
jmp    117d <artio_type_size+0x7d>
movq   $0x4,-0x10(%rbp)
jmp    117d <artio_type_size+0x7d>
movq   $0x8,-0x10(%rbp)
jmp    117d <artio_type_size+0x7d>
movq   $0x4,-0x10(%rbp)
jmp    117d <artio_type_size+0x7d>
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<artio_type_size>:
mov    $0xffffffffffffffff,%rax
cmp    $0x5,%edi
ja     111a <artio_type_size+0x1a>
movslq %edi,%rax
lea    0xeea(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

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

LLVM IR (-O2):
@switch.table.artio_type_size = [6 x i64] [i64 1, i64 1, i64 4, i64 4, i64 8, i64 4]
define i64 @artio_type_size(i32 %0) {
%2 = icmp ult i32 %0, 6
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [6 x i64], [6 x i64]* @switch.table.artio_type_size, i64 0, i64 %4
%6 = load i64, i64* %5
br label %7
7: ; preds = %1, %3
%8 = phi i64 [ %6, %3 ], [ -1, %1 ]
ret i64 %8
}
/* Type definitions */
struct sset_node {
  int dummy;
};
struct sset {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hash_name(char const *);
struct sset_node *sset_find__(struct sset const *, char const *,
                              int /*<<< orphan*/);
struct sset_node *sset_find(const struct sset *set, const char *name) {
  return sset_find__(set, name, hash_name(name));
}


x86 assembly (clang, -O0):
<sset_find>:
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,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <hash_name@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <sset_find__@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sset_find>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <hash_name@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sset_find__@plt>

LLVM IR (-O0):
%struct.sset_node = type { i32 }
%struct.sset = type { i32 }
define %struct.sset_node* @sset_find(%struct.sset* %0, i8* %1) {
%3 = alloca %struct.sset*
%4 = alloca i8*
store %struct.sset* %0, %struct.sset** %3
store i8* %1, i8** %4
%5 = load %struct.sset*, %struct.sset** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @hash_name(i8* %7)
%9 = call %struct.sset_node* @sset_find__(%struct.sset* %5, i8* %6, i32 %8)
ret %struct.sset_node* %9
}

LLVM IR (-O2):
%struct.sset_node = type { i32 }
%struct.sset = type { i32 }
define %struct.sset_node* @sset_find(%struct.sset* %0, i8* %1) {
%3 = tail call i32 @hash_name(i8* %1)
%4 = tail call %struct.sset_node* @sset_find__(%struct.sset* %0, i8* %1, i32 %3)
ret %struct.sset_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ sig_unblock(int /*<<< orphan*/);
void sig_childunblock() { sig_unblock(SIGCHLD); }


x86 assembly (clang, -O0):
<sig_childunblock>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sig_unblock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_childunblock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sig_unblock@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @sig_childunblock() {
%1 = load i32, i32* @SIGCHLD
%2 = call i32 @sig_unblock(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @sig_childunblock() {
%1 = load i32, i32* @SIGCHLD
%2 = tail call i32 @sig_unblock(i32 %1)
ret void
}
void pci_restore_iov_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_restore_iov_state(%struct.pci_dev* nocapture %0) {
ret void
}
int getSupport() { return 1; }


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

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

LLVM IR (-O0):
define i32 @getSupport() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getSupport() {
ret i32 1
}
/* Variables and functions */
void *mem_delete(void *);
void *str_delete(char *s) { return mem_delete((void *)s); }


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

x86 assembly (clang, -O2):
<str_delete>:
jmp    1030 <mem_delete@plt>

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

LLVM IR (-O2):
define i8* @str_delete(i8* %0) {
%2 = tail call i8* @mem_delete(i8* %0)
ret i8* %2
}
float max(float r, float g, float b) {
  float max = (r > g) ? ((r > b) ? r : b) : ((g > b) ? g : b);
  return max;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1159 <max+0x59>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1140 <max+0x40>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    114a <max+0x4a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    118b <max+0x8b>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1177 <max+0x77>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1181 <max+0x81>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm1,%xmm0
maxss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @max(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %21
11: ; preds = %3
%12 = load float, float* %4
%13 = load float, float* %6
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load float, float* %4
br label %19
17: ; preds = %11
%18 = load float, float* %6
br label %19
19: ; preds = %17, %15
%20 = phi float [ %16, %15 ], [ %18, %17 ]
br label %31
21: ; preds = %3
%22 = load float, float* %5
%23 = load float, float* %6
%24 = fcmp ogt float %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load float, float* %5
br label %29
27: ; preds = %21
%28 = load float, float* %6
br label %29
29: ; preds = %27, %25
%30 = phi float [ %26, %25 ], [ %28, %27 ]
br label %31
31: ; preds = %29, %19
%32 = phi float [ %20, %19 ], [ %30, %29 ]
store float %32, float* %7
%33 = load float, float* %7
ret float %33
}

LLVM IR (-O2):
define float @max(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %0, float %2
%7 = fcmp ogt float %1, %2
%8 = select i1 %7, float %1, float %2
%9 = select i1 %4, float %6, float %8
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TDB_cmd_help_print_data() { printf("data help goes here.\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"data help goes here.\00"
define void @TDB_cmd_help_print_data() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tty_navigation_object_ini_position();
void tty_navigation_object_ini(void) { tty_navigation_object_ini_position(); }


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

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

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

LLVM IR (-O2):
define void @tty_navigation_object_ini() {
%1 = tail call i32 (...) @tty_navigation_object_ini_position()
ret void
}
int sfd_isprint(const char c) { return (c >= 32 && c <= 126); }


x86 assembly (clang, -O0):
<sfd_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <sfd_isprint+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfd_isprint>:
add    $0xe0,%dil
xor    %eax,%eax
cmp    $0x5f,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @sfd_isprint(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
void rop3_113_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk2 = S ^ *D;
  stk3 = T ^ *D;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_113_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_113_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
xor    %al,%dl
and    %cl,%dl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_113_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %8
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = xor i32 %18, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = and i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %5
%31 = zext i8 %30 to i32
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = xor i32 %31, %33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = trunc i32 %38 to i8
store i8 %39, i8* %7
%40 = load i8, i8* %7
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = xor i32 %43, -1
%45 = and i32 %41, %44
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = load i8, i8* %5
%50 = zext i8 %49 to i32
%51 = and i32 %48, %50
%52 = or i32 %45, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_113_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %4, %2
%7 = and i8 %5, %6
%8 = or i8 %7, %1
%9 = xor i8 %8, -1
%10 = and i8 %4, %1
%11 = or i8 %10, %9
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move_stop(int, int, int, int);
int /*<<< orphan*/ say(char *, int);
void touch(void) {
  move_stop(1, 2, 140, 1);
  say("It's locked.", 1);
}


x86 assembly (clang, -O0):
<touch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%ecx
mov    $0x2,%esi
mov    $0x8c,%edx
mov    %ecx,%edi
call   1030 <move_stop@plt>
lea    0xebf(%rip),%rdi
mov    $0x1,%esi
call   1040 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x8c,%edx
mov    $0x1,%ecx
call   1030 <move_stop@plt>
lea    0xebf(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1040 <say@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"It's locked.\00"
define void @touch() {
%1 = call i32 @move_stop(i32 1, i32 2, i32 140, i32 1)
%2 = call i32 @say(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"It's locked.\00"
define void @touch() {
%1 = tail call i32 @move_stop(i32 1, i32 2, i32 140, i32 1)
%2 = tail call i32 @say(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm const *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
const struct tm *get_time_using_C_localtime(void *user_data) {
  time_t current_time;
  time(&current_time);
  return localtime(&current_time);
}


x86 assembly (clang, -O0):
<get_time_using_C_localtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_using_C_localtime>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @get_time_using_C_localtime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @time(i32* %3)
%5 = call %struct.tm* @localtime(i32* %3)
ret %struct.tm* %5
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @get_time_using_C_localtime(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
ret %struct.tm* %5
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
void PLATFORM_SleepSec(unsigned int uiSecond) { sleep(uiSecond); }


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

x86 assembly (clang, -O2):
<PLATFORM_SleepSec>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @PLATFORM_SleepSec(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int total;
  scanf("%d", &total);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\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)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Write(int, int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
void send_ddead(void) { Write(39, NULL, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_ddead>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_ddead>:
mov    $0x27,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
define void @send_ddead() {
%1 = call i32 @Write(i32 39, i32* null, i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @send_ddead() {
%1 = tail call i32 @Write(i32 39, i32* null, i32 0, i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t le8getv(void *p) {
  uint8_t *a;
  uint8_t v;
  a = p;
  v = a[0];
  return v;
}


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

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

LLVM IR (-O0):
define i32 @le8getv(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @le8getv(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
char *strchr(const char *str, int character) {
  while (*str != (char)character)
    if (!*str++)
      return 0;
  return (char *)str;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
je     114a <strchr+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
jne    1145 <strchr+0x45>
movq   $0x0,-0x8(%rbp)
jmp    1152 <strchr+0x52>
jmp    110b <strchr+0xb>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
nopw   0x0(%rax,%rax,1)
movsbl (%rax),%edx
cmp    %edx,%ecx
je     1121 <strchr+0x21>
add    $0x1,%rax
test   %dl,%dl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %10, %2
%6 = phi i8* [ %0, %2 ], [ %11, %10 ]
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %4, %8
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = icmp eq i8 %7, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %10
%14 = phi i8* [ null, %10 ], [ %6, %5 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ _write_to_socket(char *);
int do_rnfr(void) {
  if (_write_to_socket("350 Please send the RNTO command.\r\n") < 0) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<do_rnfr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <_write_to_socket@plt>
cmp    $0x0,%rax
jge    113a <do_rnfr+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <do_rnfr+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_rnfr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <_write_to_socket@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"350 Please send the RNTO command.\0D\0A\00"
define i32 @do_rnfr() {
%1 = alloca i32
%2 = call i64 @_write_to_socket(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [36 x i8] c"350 Please send the RNTO command.\0D\0A\00"
define i32 @do_rnfr() {
%1 = tail call i64 @_write_to_socket(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = ashr i64 %1, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
void write_err_msg(const char *msg) { write(STDERR_FILENO, msg, strlen(msg)); }


x86 assembly (clang, -O0):
<write_err_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_err_msg>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
define void @write_err_msg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDERR_FILENO
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @write(i32 %3, i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
define void @write_err_msg(i8* %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %2, i8* %0, i32 %3)
ret void
}
int ol_backend_kelvin_flux_init(struct ol_backend_kelvin_s *self) {
  (void)(self);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.ol_backend_kelvin_s = type opaque
define i32 @ol_backend_kelvin_flux_init(%struct.ol_backend_kelvin_s* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fake_a_rnd(int, int, int);
long sd_region(long skip_count) {
  long li;
  for (li = 1L; li <= skip_count; li++)
    fake_a_rnd((int)(72 * 0.4), (int)(72 * 1.6), 42);
  return (0);
}


x86 assembly (clang, -O0):
<sd_region>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jg     1157 <sd_region+0x47>
mov    $0x1c,%edi
mov    $0x73,%esi
mov    $0x2a,%edx
call   1030 <fake_a_rnd@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <sd_region+0x14>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_region>:
push   %rbx
test   %rdi,%rdi
jle    113a <sd_region+0x2a>
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    $0x1c,%edi
mov    $0x73,%esi
mov    $0x2a,%edx
call   1030 <fake_a_rnd@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <sd_region+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @sd_region(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 1, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp sle i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @fake_a_rnd(i32 28, i32 115, i32 42)
br label %10
10: ; preds = %8
%11 = load i64, i64* %3
%12 = add nsw i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
ret i64 0
}

LLVM IR (-O2):
define i64 @sd_region(i64 %0) {
%2 = icmp slt i64 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @fake_a_rnd(i32 28, i32 115, i32 42)
%6 = add nuw i64 %4, 1
%7 = icmp eq i64 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i64 0
}
void set_flag_weak(int *flag, int val) { __atomic_store_n(flag, val, 0); }


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

x86 assembly (clang, -O2):
<set_flag_weak>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_flag_weak(i32* nocapture writeonly %0, i32 %1) {
store atomic i32 %1, i32* %0 monotonic
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void _sig_term_handler(int sno) {
  printf("Bye..It was fun hogging..!");
  _exit(0);
}


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

x86 assembly (clang, -O2):
<_sig_term_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Bye..It was fun hogging..!\00"
define void @_sig_term_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Bye..It was fun hogging..!\00"
define void @_sig_term_handler(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t toU64(long v) { return (uint64_t)v; }


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

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

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

LLVM IR (-O2):
define i32 @toU64(i64 %0) {
%2 = trunc i64 %0 to i32
ret i32 %2
}
void g_strsplit() {}


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

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

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

LLVM IR (-O2):
define void @g_strsplit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_setenv();
int main(int argc, char **argv) {
  if (!test_setenv())
    return 1;
  printf("OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_setenv@plt>
cmp    $0x0,%eax
jne    1152 <main+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1165 <main+0x45>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <test_setenv@plt>
test   %eax,%eax
je     113c <main+0x1c>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
jmp    1141 <main+0x21>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"OK\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_setenv()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 1, i32* %3
br label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %11
11: ; preds = %9, %8
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_setenv()
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %8
}
int poe_isquote(char c) { return c == '"' || c == '\''; }


x86 assembly (clang, -O0):
<poe_isquote>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x22,%ecx
mov    %al,-0x2(%rbp)
je     1129 <poe_isquote+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x27,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<poe_isquote>:
cmp    $0x22,%dil
sete   %al
cmp    $0x27,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @poe_isquote(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 34
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 39
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @poe_isquote(i8 signext %0) {
%2 = icmp eq i8 %0, 34
%3 = icmp eq i8 %0, 39
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ __daemon();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ mydm_print(char *);
void do_daemon() {
  if (__daemon() < 0) {
    mydm_print("Can not initialize daemon\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<do_daemon>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <__daemon@plt>
cmp    $0x0,%rax
jge    115b <do_daemon+0x2b>
lea    0xeb4(%rip),%rdi
call   1040 <mydm_print@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_daemon>:
push   %rax
xor    %eax,%eax
call   1030 <__daemon@plt>
test   %rax,%rax
js     113f <do_daemon+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1040 <mydm_print@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Can not initialize daemon\0A\00"
define void @do_daemon() {
%1 = call i64 (...) @__daemon()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @mydm_print(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Can not initialize daemon\0A\00"
define void @do_daemon() {
%1 = tail call i64 (...) @__daemon()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @mydm_print(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}