xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, unsigned long *);
char *strstr(char *, char *);
unsigned long ph_parseCallProgressUdata(char *data) {
  char *tag = strstr(data, "UDATA=");
  unsigned long ret;
  if (!tag)
    return (unsigned long)-1;
  sscanf(tag + 6, "%08lx", &ret);
  return ret;
}


x86 assembly (clang, -O0):
<ph_parseCallProgressUdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <ph_parseCallProgressUdata+0x38>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1178 <ph_parseCallProgressUdata+0x58>
mov    -0x18(%rbp),%rdi
add    $0x6,%rdi
lea    0xea0(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ph_parseCallProgressUdata>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     114e <ph_parseCallProgressUdata+0x2e>
add    $0x6,%rax
lea    0xeca(%rip),%rsi
mov    %rsp,%rdx
mov    %rax,%rdi
call   1030 <sscanf@plt>
mov    (%rsp),%rax
pop    %rcx
ret
mov    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"UDATA=\00"
@.str.1 = [6 x i8] c"%08lx\00"
define i64 @ph_parseCallProgressUdata(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @strstr(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %1
store i64 -1, i64* %2
br label %16
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 6
%14 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64* %5)
%15 = load i64, i64* %5
store i64 %15, i64* %2
br label %16
16: ; preds = %11, %10
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
@.str = [7 x i8] c"UDATA=\00"
@.str.1 = [6 x i8] c"%08lx\00"
define i64 @ph_parseCallProgressUdata(i8* %0) {
%2 = alloca i64
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i64* %2 to i8*
%5 = icmp eq i8* %3, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 6
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%9 = load i64, i64* %2
br label %10
10: ; preds = %1, %6
%11 = phi i64 [ %9, %6 ], [ -1, %1 ]
ret i64 %11
}
void kdba_save_running(struct kdba_running_process *k, struct pt_regs *regs) {}


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

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

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

LLVM IR (-O2):
%struct.kdba_running_process = type opaque
%struct.pt_regs = type opaque
define void @kdba_save_running(%struct.kdba_running_process* nocapture %0, %struct.pt_regs* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_dump_exploded_nodes(int /*<<< orphan*/);
int /*<<< orphan*/ __analyzer_eval(int);
int test_40(int flag) {
  int i;
  if (flag)
    i = 43;
  else
    i = 17;
  __analyzer_dump_exploded_nodes(0);
  if (flag)
    __analyzer_eval(i == 43);
  else
    __analyzer_eval(i == 17);
}


x86 assembly (clang, -O0):
<test_40>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1141 <test_40+0x21>
movl   $0x2b,-0xc(%rbp)
jmp    1148 <test_40+0x28>
movl   $0x11,-0xc(%rbp)
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
cmpl   $0x0,-0x8(%rbp)
je     116f <test_40+0x4f>
cmpl   $0x2b,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
jmp    1180 <test_40+0x60>
cmpl   $0x11,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_40>:
push   %rax
xor    %edi,%edi
call   1040 <__analyzer_dump_exploded_nodes@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define i32 @test_40(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 43, i32* %4
br label %9
8: ; preds = %1
store i32 17, i32* %4
br label %9
9: ; preds = %8, %7
%10 = call i32 @__analyzer_dump_exploded_nodes(i32 0)
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 43
%16 = zext i1 %15 to i32
%17 = call i32 @__analyzer_eval(i32 %16)
br label %23
18: ; preds = %9
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 17
%21 = zext i1 %20 to i32
%22 = call i32 @__analyzer_eval(i32 %21)
br label %23
23: ; preds = %18, %13
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @test_40(i32 %0) {
%2 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
%3 = tail call i32 @__analyzer_eval(i32 1)
ret i32 undef
}
signed long long int
signedlonglongint_ignoring_signedshortint(signed long long int x,
                                          signed short int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @signedlonglongint_ignoring_signedshortint(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglongint_ignoring_signedshortint(i64 returned %0, i16 signext %1) {
ret i64 %0
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ release;
};

/* Variables and functions */
char const *bprintf(char *, int /*<<< orphan*/);
scalar_t__ uname(struct utsname *);
int /*<<< orphan*/ warn(char *);
const char *kernel_release(void) {
  struct utsname udata;
  if (uname(&udata) < 0) {
    warn("uname:");
    return NULL;
  }
  return bprintf("%s", udata.release);
}


x86 assembly (clang, -O0):
<kernel_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
call   1040 <uname@plt>
cmp    $0x0,%rax
jge    1164 <kernel_release+0x34>
lea    0xeae(%rip),%rdi
call   1030 <warn@plt>
movq   $0x0,-0x8(%rbp)
jmp    1177 <kernel_release+0x47>
mov    -0x10(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1050 <bprintf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_release>:
push   %rax
mov    %rsp,%rdi
call   1040 <uname@plt>
test   %rax,%rax
js     114e <kernel_release+0x1e>
mov    (%rsp),%esi
lea    0xebf(%rip),%rdi
pop    %rax
jmp    1050 <bprintf@plt>
lea    0xeab(%rip),%rdi
call   1030 <warn@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.utsname = type { i32 }
@.str = [7 x i8] c"uname:\00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @kernel_release() {
%1 = alloca i8*
%2 = alloca %struct.utsname
%3 = call i64 @uname(%struct.utsname* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %1
br label %11
7: ; preds = %0
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
store i8* %10, i8** %1
br label %11
11: ; preds = %7, %5
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
@.str = [7 x i8] c"uname:\00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @kernel_release() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i64 @uname(%struct.utsname* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %0
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %5
%12 = phi i8* [ null, %5 ], [ %10, %7 ]
ret i8* %12
}
_Complex long long pass_complex_longlong(_Complex long long arg) { return arg; }


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

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

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

LLVM IR (-O2):
define { i64, i64 } @pass_complex_longlong(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
int test_imm_1Cint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x1C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Cint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x1c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Cint64_highword_mem>:
testb  $0x1c,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Cint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 28
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_1Cint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 120259084288
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ print_ndlist();
int /*<<< orphan*/ rec_log(char *, long);
void sigusr2_handler(int sig) {
  rec_log("info: SIGUSR2 called(PID: %ld)", (long)getpid());
  print_ndlist();
}


x86 assembly (clang, -O0):
<sigusr2_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,%rsi
lea    0xeb4(%rip),%rdi
call   1050 <rec_log@plt>
mov    $0x0,%al
call   1040 <print_ndlist@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigusr2_handler>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1050 <rec_log@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_ndlist@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"info: SIGUSR2 called(PID: %ld)\00"
define void @sigusr2_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @getpid()
%4 = call i32 @rec_log(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = call i32 (...) @print_ndlist()
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"info: SIGUSR2 called(PID: %ld)\00"
define void @sigusr2_handler(i32 %0) {
%2 = tail call i64 (...) @getpid()
%3 = tail call i32 @rec_log(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = tail call i32 (...) @print_ndlist()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int mbr_part_is_ext(uint8_t type) {
  if ((type == 0x05) || (type == 0x0f) || (type == 0x85))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<mbr_part_is_ext>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1128 <mbr_part_is_ext+0x28>
cmpl   $0xf,-0x8(%rbp)
je     1128 <mbr_part_is_ext+0x28>
cmpl   $0x85,-0x8(%rbp)
jne    1134 <mbr_part_is_ext+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <mbr_part_is_ext+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbr_part_is_ext>:
mov    $0x1,%eax
cmp    $0x5,%edi
je     1119 <mbr_part_is_ext+0x19>
cmp    $0xf,%edi
je     1119 <mbr_part_is_ext+0x19>
cmp    $0x85,%edi
je     1119 <mbr_part_is_ext+0x19>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mbr_part_is_ext(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 5
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 15
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 133
br i1 %11, label %12, label %13
12: ; preds = %9, %6, %1
store i32 1, i32* %2
br label %14
13: ; preds = %9
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @mbr_part_is_ext(i32 %0) {
switch i32 %0, label %2 [
i32 133, label %3
i32 15, label %3
i32 5, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void trifree(int *memptr) { free(memptr); }


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

x86 assembly (clang, -O2):
<trifree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @trifree(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
unsigned ggg(unsigned a) { return a & 0xffu; }


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

x86 assembly (clang, -O2):
<ggg>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @ggg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @ggg(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ main_work(char, char, char, char);
int /*<<< orphan*/ print_num_e(char, char, char, char);
void ft_print_comb2(void) {
  char a;
  char i;
  char b;
  char c;
  a = '0';
  i = '0';
  b = '0';
  c = '0';
  main_work(a, i, b, c);
  print_num_e('9', '8', '9', '9');
}


x86 assembly (clang, -O0):
<ft_print_comb2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x1(%rbp)
movb   $0x30,-0x2(%rbp)
movb   $0x30,-0x3(%rbp)
movb   $0x30,-0x4(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x2(%rbp),%cl
mov    -0x3(%rbp),%al
movsbl %dl,%edi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x4(%rbp),%ecx
call   1030 <main_work@plt>
mov    $0x39,%ecx
mov    $0x38,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1040 <print_num_e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_comb2>:
push   %rax
mov    $0x30,%edi
mov    $0x30,%esi
mov    $0x30,%edx
mov    $0x30,%ecx
call   1030 <main_work@plt>
mov    $0x39,%edi
mov    $0x38,%esi
mov    $0x39,%edx
mov    $0x39,%ecx
pop    %rax
jmp    1040 <print_num_e@plt>

LLVM IR (-O0):
define void @ft_print_comb2() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 48, i8* %1
store i8 48, i8* %2
store i8 48, i8* %3
store i8 48, i8* %4
%5 = load i8, i8* %1
%6 = load i8, i8* %2
%7 = load i8, i8* %3
%8 = load i8, i8* %4
%9 = call i32 @main_work(i8 signext %5, i8 signext %6, i8 signext %7, i8 signext %8)
%10 = call i32 @print_num_e(i8 signext 57, i8 signext 56, i8 signext 57, i8 signext 57)
ret void
}

LLVM IR (-O2):
define void @ft_print_comb2() {
%1 = tail call i32 @main_work(i8 signext 48, i8 signext 48, i8 signext 48, i8 signext 48)
%2 = tail call i32 @print_num_e(i8 signext 57, i8 signext 56, i8 signext 57, i8 signext 57)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void func(int x, int y) {
  if (x == y)
    return;
  else
    abort();
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1130 <func+0x20>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<func>:
cmp    %esi,%edi
jne    1115 <func+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @func(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
ret void
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @func(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %5
4: ; preds = %2
ret void
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
}
void XCirculateSubwindowsDown() {}


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

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

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

LLVM IR (-O2):
define void @XCirculateSubwindowsDown() {
ret void
}
/* Variables and functions */
float cosf(float);
float r_cos(float *x) { return (cosf(*x)); }


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

x86 assembly (clang, -O2):
<r_cos>:
movss  (%rdi),%xmm0
jmp    1030 <cosf@plt>

LLVM IR (-O0):
define float @r_cos(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call float @cosf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @r_cos(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @cosf(float %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ rsp_load_data(void *, unsigned long, int /*<<< orphan*/);
__attribute__((deprecated("use rsp_load_data instead"))) void
load_data(void *start, unsigned long size) {
  rsp_load_data(start, size, 0);
}


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

x86 assembly (clang, -O2):
<load_data>:
xor    %edx,%edx
jmp    1030 <rsp_load_data@plt>

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

LLVM IR (-O2):
define void @load_data(i8* %0, i64 %1) {
%3 = tail call i32 @rsp_load_data(i8* %0, i64 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(float);
int /*<<< orphan*/ printid(float);
void main() {
  int i = 135e2;
  float x = 3.;
  printid(i);
  printid(x);
  x = 3000000000;
  print(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x34bc,-0x4(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x8(%rbp),%xmm0
call   1040 <printid@plt>
movss  0xea8(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1040 <printid@plt>
movss  0xece(%rip),%xmm0
call   1040 <printid@plt>
movss  0xec5(%rip),%xmm0
pop    %rax
jmp    1030 <print@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca float
store i32 13500, i32* %1
store float 3.000000e+00, float* %2
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to float
%5 = call i32 @printid(float %4)
%6 = load float, float* %2
%7 = call i32 @printid(float %6)
store float 3.000000e+09, float* %2
%8 = load float, float* %2
%9 = call i32 @print(float %8)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @printid(float 1.350000e+04)
%2 = tail call i32 @printid(float 3.000000e+00)
%3 = tail call i32 @print(float 3.000000e+09)
ret void
}
/* Type definitions */
struct timeval {
  unsigned int tv_sec;
  unsigned int tv_usec;
};

/* Variables and functions */
unsigned int getpid();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned int get_devrand_fallback(void) {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return (tv.tv_sec ^ tv.tv_usec) ^ getpid();
}


x86 assembly (clang, -O0):
<get_devrand_fallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_devrand_fallback>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    0xc(%rsp),%ebx
xor    0x8(%rsp),%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_devrand_fallback() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = xor i32 %4, %6
%8 = call i32 (...) @getpid()
%9 = xor i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_devrand_fallback() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = xor i32 %7, %5
%9 = call i32 (...) @getpid()
%10 = xor i32 %8, %9
ret i32 %10
}
/* Variables and functions */
double pow(int, int);
double et_a(double r_net_day, double evap_fr, double tempk) {
  double latent, t_celsius, result;
  t_celsius = tempk - 273.15;
  latent = 86400 / ((2.501 - 0.002361 * t_celsius) * pow(10, 6));
  result = r_net_day * evap_fr * latent;
  return result;
}


x86 assembly (clang, -O0):
<et_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xee4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    $0xa,%edi
mov    $0x6,%esi
call   1030 <pow@plt>
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe81(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<et_a>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
addsd  0xed8(%rip),%xmm2
mulsd  0xed8(%rip),%xmm2
addsd  0xed8(%rip),%xmm2
movsd  %xmm2,(%rsp)
mov    $0xa,%edi
mov    $0x6,%esi
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @et_a(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %6
%11 = fsub double %10, 2.731500e+02
store double %11, double* %8
%12 = load double, double* %8
%13 = call double @llvm.fmuladd.f64(double -2.361000e-03, double %12, double 2.501000e+00)
%14 = call double @pow(i32 10, i32 6)
%15 = fmul double %13, %14
%16 = fdiv double 8.640000e+04, %15
store double %16, double* %7
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load double, double* %7
%21 = fmul double %19, %20
store double %21, double* %9
%22 = load double, double* %9
ret double %22
}

LLVM IR (-O2):
define double @et_a(double %0, double %1, double %2) {
%4 = fadd double %2, -2.731500e+02
%5 = tail call double @llvm.fmuladd.f64(double %4, double -2.361000e-03, double 2.501000e+00)
%6 = tail call double @pow(i32 10, i32 6)
%7 = fmul double %5, %6
%8 = fdiv double 8.640000e+04, %7
%9 = fmul double %0, %1
%10 = fmul double %9, %8
ret double %10
}
long SIO1_test(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @SIO1_test() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ print_pwd(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                             int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  char p[7];
  memset(p, 0, 7);
  print_pwd(p, 0, 0, n - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0xf(%rbp),%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <memset@plt>
lea    -0xf(%rbp),%rdi
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
mov    %edx,%esi
call   1040 <print_pwd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0x9(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <memset@plt>
mov    0x4(%rsp),%ecx
add    $0xffffffff,%ecx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <print_pwd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [7 x i8]
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i32 0, i32 7)
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
%10 = call i32 @print_pwd(i8* %7, i32 0, i32 0, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i32 0, i32 7)
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
%9 = call i32 @print_pwd(i8* %5, i32 0, i32 0, i32 %8)
ret i32 0
}
int int_val(const void *v) { return *((int *)v); }


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

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

LLVM IR (-O0):
define i32 @int_val(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @int_val(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void ds400_dummyFunc(void) { ; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @ds400_dummyFunc() {
ret void
}
/* Variables and functions */
int ntokenize(int, char *, char **, char *);
char *getword(char *words) {
  char *tokens[3];
  int num_toks;
  num_toks = ntokenize(2, words, tokens, " \n\t><|&");
  if (num_toks == 0)
    tokens[0] = NULL;
  return tokens[0];
}


x86 assembly (clang, -O0):
<getword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x2,%edi
lea    0xed0(%rip),%rcx
call   1030 <ntokenize@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    114a <getword+0x3a>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getword>:
sub    $0x18,%rsp
mov    %rdi,%rsi
lea    0xee2(%rip),%rcx
mov    %rsp,%rdx
mov    $0x2,%edi
call   1030 <ntokenize@plt>
test   %eax,%eax
je     1138 <getword+0x28>
mov    (%rsp),%rax
add    $0x18,%rsp
ret
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c" \0A\09><|&\00"
define i8* @getword(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8*]
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%7 = call i32 @ntokenize(i32 2, i8* %5, i8** %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
store i8* null, i8** %11
br label %12
12: ; preds = %10, %1
%13 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%14 = load i8*, i8** %13
ret i8* %14
}

LLVM IR (-O2):
@.str = [8 x i8] c" \0A\09><|&\00"
define i8* @getword(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = call i32 @ntokenize(i32 2, i8* %0, i8** %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %4
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
void InfoDest(void *a) { ; }


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

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

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

LLVM IR (-O2):
define void @InfoDest(i8* nocapture %0) {
ret void
}
void rop3_197_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ S;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_197_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %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)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_197_0_0>:
mov    (%rdi),%al
xor    %sil,%al
or     %dl,%al
xor    %sil,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_197_0_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** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_197_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, %1
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int errno;
int GetErrno() { return errno; }


x86 assembly (clang, -O0):
<GetErrno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetErrno>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @GetErrno() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @GetErrno() {
%1 = load i32, i32* @errno
ret i32 %1
}
int length() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @length() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TelosbSensorReadingNoMessageEditsC__Boot__booted();
void RealMainP__Boot__booted(void) {
  TelosbSensorReadingNoMessageEditsC__Boot__booted();
}


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

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

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

LLVM IR (-O2):
define void @RealMainP__Boot__booted() {
%1 = tail call i32 (...) @TelosbSensorReadingNoMessageEditsC__Boot__booted()
ret void
}
int SetI420ChromaResamplingMode(int new_mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SetI420ChromaResamplingMode(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put_byte(int, int);
__attribute__((always_)) void patch_CAS_3_2_3_1233_extra(void) {
  put_byte(0x10084E8B, 0xEA);
}


x86 assembly (clang, -O0):
<patch_CAS_3_2_3_1233_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10084e8b,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_CAS_3_2_3_1233_extra>:
mov    $0x10084e8b,%edi
mov    $0xea,%esi
jmp    1030 <put_byte@plt>

LLVM IR (-O0):
define void @patch_CAS_3_2_3_1233_extra() {
%1 = call i32 @put_byte(i32 268979851, i32 234)
ret void
}

LLVM IR (-O2):
define void @patch_CAS_3_2_3_1233_extra() {
%1 = tail call i32 @put_byte(i32 268979851, i32 234)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x8e() {
  Assert_real((isalpha(142) == 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_isalpha.c",
              715, ("isalpha should be 0 for 0x8e"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x8e>:
push   %rax
mov    $0x8e,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2cb,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x8e\00"
define void @t_isalpha_0x8e() {
%1 = call i64 @isalpha(i32 142)
%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 715, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x8e\00"
define void @t_isalpha_0x8e() {
%1 = tail call i64 @isalpha(i32 142)
%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 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void Config_include_destroy(void *value) {
  char *include = (char *)value;
  if (include) {
    free(include);
    include = NULL;
  }
}


x86 assembly (clang, -O0):
<Config_include_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <Config_include_destroy+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Config_include_destroy>:
test   %rdi,%rdi
je     111a <Config_include_destroy+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @Config_include_destroy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void print_define_motor() {}


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

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

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

LLVM IR (-O2):
define void @print_define_motor() {
ret void
}
int test_imm_70uint8_reg(unsigned char val) {
  return ((val) & (0x70 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_70uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 112
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void _glapi_check_multithread(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_viewport_set_vadjustment() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world static\n");
  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 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [19 x i8] c"hello world static\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double arccos5(double);
double arccos(double x) { return arccos5(x); }


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

x86 assembly (clang, -O2):
<arccos>:
jmp    1030 <arccos5@plt>

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

LLVM IR (-O2):
define double @arccos(double %0) {
%2 = tail call double @arccos5(double %0)
ret double %2
}
void roundr() {}


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

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

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

LLVM IR (-O2):
define void @roundr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ recurse(int, long);
int main() {
  long int n = 600851475143;
  printf("%ld\n", recurse(3, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x8be589eac7,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x3,%edi
call   1030 <recurse@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x8be589eac7,%rsi
mov    $0x3,%edi
call   1030 <recurse@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @recurse(i32 3, i64 600851475143)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int charNibbleToUInt(char);
uint8_t charByteToUInt(char hex[2]) {
  return charNibbleToUInt(hex[0]) << 4 | charNibbleToUInt(hex[1]);
}


x86 assembly (clang, -O0):
<charByteToUInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <charNibbleToUInt@plt>
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <charNibbleToUInt@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charByteToUInt>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <charNibbleToUInt@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
movsbl 0x1(%rbx),%edi
call   1030 <charNibbleToUInt@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @charByteToUInt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @charNibbleToUInt(i8 signext %5)
%7 = shl i32 %6, 4
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = call i32 @charNibbleToUInt(i8 signext %10)
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @charByteToUInt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @charNibbleToUInt(i8 signext %2)
%4 = shl i32 %3, 4
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i32 @charNibbleToUInt(i8 signext %6)
%8 = or i32 %7, %4
ret i32 %8
}
/* Variables and functions */
scalar_t__ strchr(char const *, int);
int in_class(int c, const char *s) { return s && (strchr(s, c) != 0); }


x86 assembly (clang, -O0):
<in_class>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1145 <in_class+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_class>:
test   %rsi,%rsi
je     1132 <in_class+0x22>
push   %rax
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @in_class(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load i32, i32* %3
%10 = call i64 @strchr(i8* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %2
%13 = phi i1 [ false, %2 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @in_class(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @strchr(i8* %1, i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ 0, %2 ], [ %7, %4 ]
ret i32 %9
}