xunge/DecIR huggingface dataset:
/* Variables and functions */
double mercator_y(double);
double geohashGetYMercator(double latitude) {
  if (latitude > 90 || latitude < -90) {
    return latitude;
  }
  return mercator_y(latitude);
}


x86 assembly (clang, -O0):
<geohashGetYMercator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1147 <geohashGetYMercator+0x37>
movsd  0xecc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1156 <geohashGetYMercator+0x46>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1165 <geohashGetYMercator+0x55>
movsd  -0x10(%rbp),%xmm0
call   1030 <mercator_y@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geohashGetYMercator>:
ucomisd 0xee8(%rip),%xmm0
ja     112d <geohashGetYMercator+0x1d>
movsd  0xee6(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     112d <geohashGetYMercator+0x1d>
jmp    1030 <mercator_y@plt>
ret

LLVM IR (-O0):
define double @geohashGetYMercator(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 9.000000e+01
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp olt double %7, -9.000000e+01
br i1 %8, label %9, label %11
9: ; preds = %6, %1
%10 = load double, double* %3
store double %10, double* %2
br label %14
11: ; preds = %6
%12 = load double, double* %3
%13 = call double @mercator_y(double %12)
store double %13, double* %2
br label %14
14: ; preds = %11, %9
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @geohashGetYMercator(double %0) {
%2 = fcmp ogt double %0, 9.000000e+01
%3 = fcmp olt double %0, -9.000000e+01
%4 = or i1 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call double @mercator_y(double %0)
br label %7
7: ; preds = %1, %5
%8 = phi double [ %6, %5 ], [ %0, %1 ]
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int XK_KP_Enter;
int /*<<< orphan*/ focus_keypad_input(int);
int /*<<< orphan*/ focus_pop();
void focus_numkeys_input_cb(Widget w, void *data, void *class) {
  int key = (int)class;
  if (key == XK_KP_Enter)
    focus_pop();
  else
    focus_keypad_input(key);
}


x86 assembly (clang, -O0):
<focus_numkeys_input_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
jne    1158 <focus_numkeys_input_cb+0x38>
mov    $0x0,%al
call   1040 <focus_pop@plt>
jmp    1160 <focus_numkeys_input_cb+0x40>
mov    -0x1c(%rbp),%edi
call   1030 <focus_keypad_input@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<focus_numkeys_input_cb>:
mov    0x2ec9(%rip),%rax
cmp    %edx,(%rax)
jne    1132 <focus_numkeys_input_cb+0x12>
xor    %eax,%eax
jmp    1040 <focus_pop@plt>
mov    %edx,%edi
jmp    1030 <focus_keypad_input@plt>

LLVM IR (-O0):
@XK_KP_Enter = global i32 0
define void @focus_numkeys_input_cb(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = ptrtoint i8* %8 to i32
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = load i32, i32* @XK_KP_Enter
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 (...) @focus_pop()
br label %18
15: ; preds = %3
%16 = load i32, i32* %7
%17 = call i32 @focus_keypad_input(i32 %16)
br label %18
18: ; preds = %15, %13
ret void
}

LLVM IR (-O2):
@XK_KP_Enter = global i32 0
define void @focus_numkeys_input_cb(i32 %0, i8* nocapture readnone %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = load i32, i32* @XK_KP_Enter
%7 = icmp eq i32 %6, %5
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (...) @focus_pop()
br label %12
10: ; preds = %3
%11 = tail call i32 @focus_keypad_input(i32 %5)
br label %12
12: ; preds = %10, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: mt [-f device] command [count]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: mt [-f device] command [count]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: mt [-f device] command [count]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int atoi(char *);
int is_error(char *code) {
  int num_code = atoi(code);
  return num_code >= 400 && num_code <= 599;
}


x86 assembly (clang, -O0):
<is_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x190,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     1147 <is_error+0x37>
cmpl   $0x257,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_error>:
push   %rax
call   1030 <atoi@plt>
add    $0xfffffe70,%eax
xor    %ecx,%ecx
cmp    $0xc8,%eax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_error(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = add i32 %2, -400
%4 = icmp ult i32 %3, 200
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_59uint16_reg(unsigned short val) {
  return ((val) & (-0x59 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_59uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -89
%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_59uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -89
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int arch_ffz(unsigned int bitmask) {
  __asm__("bsfl %1,%0" : "=r"(bitmask) : "r"(~bitmask));
  return bitmask;
}


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

x86 assembly (clang, -O2):
<arch_ffz>:
not    %edi
bsf    %edi,%eax
ret

LLVM IR (-O0):
define i32 @arch_ffz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = call i32 asm "bsfl $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @arch_ffz(i32 %0) {
%2 = xor i32 %0, -1
%3 = tail call i32 asm "bsfl $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %2)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_x(void *_p, int _v) {
  ((XLeaveWindowEvent *)_p)->x = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XLeaveWindowEvent_x(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct rtattr {
  int dummy;
};
struct qdisc_util {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int prio_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @prio_print_xstats(%struct.qdisc_util* %0, i32* %1, %struct.rtattr* %2) {
%4 = alloca %struct.qdisc_util*
%5 = alloca i32*
%6 = alloca %struct.rtattr*
store %struct.qdisc_util* %0, %struct.qdisc_util** %4
store i32* %1, i32** %5
store %struct.rtattr* %2, %struct.rtattr** %6
ret i32 0
}

LLVM IR (-O2):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @prio_print_xstats(%struct.qdisc_util* nocapture readnone %0, i32* nocapture readnone %1, %struct.rtattr* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ malloc(scalar_t__);
char *strcpy(int /*<<< orphan*/, char const *);
scalar_t__ strlen(char const *);
char *duplicate_string(const char *string) {
  return strcpy(malloc(strlen(string) + 1), string);
}


x86 assembly (clang, -O0):
<duplicate_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duplicate_string>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @duplicate_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i32 @malloc(i64 %5)
%7 = load i8*, i8** %2
%8 = call i8* @strcpy(i32 %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @duplicate_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @malloc(i64 %3)
%5 = tail call i8* @strcpy(i32 %4, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int set_NonBlocking(int s) {
  int flags = fcntl(s, F_GETFL);
  if (flags < 0) {
    return -1;
  }
  int status = fcntl(s, F_SETFL, flags | O_NONBLOCK);
  return status;
}


x86 assembly (clang, -O0):
<set_NonBlocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1147 <set_NonBlocking+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <set_NonBlocking+0x5f>
mov    -0x8(%rbp),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8b(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_NonBlocking>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
test   %eax,%eax
js     1145 <set_NonBlocking+0x35>
mov    0x2eaa(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb1(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_NonBlocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* @F_GETFL
%8 = call i32 (i32, i32, ...) @fcntl(i32 %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %20
12: ; preds = %1
%13 = load i32, i32* %3
%14 = load i32, i32* @F_SETFL
%15 = load i32, i32* %4
%16 = load i32, i32* @O_NONBLOCK
%17 = or i32 %15, %16
%18 = call i32 (i32, i32, ...) @fcntl(i32 %13, i32 %14, i32 %17)
store i32 %18, i32* %5
%19 = load i32, i32* %5
store i32 %19, i32* %2
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_NonBlocking(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ doReset();
int /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ writeByte(unsigned char);
void writeScratchPad(unsigned char TH, unsigned char TL, unsigned char config) {
  int loop;
  doReset();
  usleep(10);
  writeByte(0xCC);
  writeByte(0x4E);
  writeByte(TH);
  writeByte(TL);
  writeByte(config);
}


x86 assembly (clang, -O0):
<writeScratchPad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0x0,%al
call   1030 <doReset@plt>
mov    $0xa,%edi
call   1050 <usleep@plt>
mov    $0xcc,%edi
call   1040 <writeByte@plt>
mov    $0x4e,%edi
call   1040 <writeByte@plt>
movzbl -0x1(%rbp),%edi
call   1040 <writeByte@plt>
movzbl -0x2(%rbp),%edi
call   1040 <writeByte@plt>
movzbl -0x3(%rbp),%edi
call   1040 <writeByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeScratchPad>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <doReset@plt>
mov    $0xa,%edi
call   1050 <usleep@plt>
mov    $0xcc,%edi
call   1040 <writeByte@plt>
mov    $0x4e,%edi
call   1040 <writeByte@plt>
mov    %ebx,%edi
call   1040 <writeByte@plt>
mov    %ebp,%edi
call   1040 <writeByte@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <writeByte@plt>

LLVM IR (-O0):
define void @writeScratchPad(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = call i32 (...) @doReset()
%9 = call i32 @usleep(i32 10)
%10 = call i32 @writeByte(i8 zeroext -52)
%11 = call i32 @writeByte(i8 zeroext 78)
%12 = load i8, i8* %4
%13 = call i32 @writeByte(i8 zeroext %12)
%14 = load i8, i8* %5
%15 = call i32 @writeByte(i8 zeroext %14)
%16 = load i8, i8* %6
%17 = call i32 @writeByte(i8 zeroext %16)
ret void
}

LLVM IR (-O2):
define void @writeScratchPad(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 (...) @doReset()
%5 = tail call i32 @usleep(i32 10)
%6 = tail call i32 @writeByte(i8 zeroext -52)
%7 = tail call i32 @writeByte(i8 zeroext 78)
%8 = tail call i32 @writeByte(i8 zeroext %0)
%9 = tail call i32 @writeByte(i8 zeroext %1)
%10 = tail call i32 @writeByte(i8 zeroext %2)
ret void
}
void __DELETE_java_util_Hashtable_1(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_util_Hashtable_1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_util_Hashtable_1(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_to_child(int, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ user_nick(int, char *, char *);
void server_nick(int cid, char *p) {
  char *new, *old;
  new = strtok(p, " ");
  old = strtok(NULL, " ");
  user_nick(cid, new, old);
  send_to_child(cid, "OK NICK");
}


x86 assembly (clang, -O0):
<server_nick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xea2(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <user_nick@plt>
mov    -0x4(%rbp),%edi
lea    0xe81(%rip),%rsi
call   1040 <send_to_child@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_nick>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0xec2(%rip),%r14
mov    %rsi,%rdi
mov    %r14,%rsi
call   1050 <strtok@plt>
mov    %rax,%r15
xor    %edi,%edi
mov    %r14,%rsi
call   1050 <strtok@plt>
mov    %ebx,%edi
mov    %r15,%rsi
mov    %rax,%rdx
call   1030 <user_nick@plt>
lea    0xe98(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <send_to_child@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [8 x i8] c"OK NICK\00"
define void @server_nick(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i8* @strtok(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %5
%9 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @user_nick(i32 %10, i8* %11, i8* %12)
%14 = load i32, i32* %3
%15 = call i32 @send_to_child(i32 %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [8 x i8] c"OK NICK\00"
define void @server_nick(i32 %0, i8* %1) {
%3 = tail call i8* @strtok(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @user_nick(i32 %0, i8* %3, i8* %4)
%6 = tail call i32 @send_to_child(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void sunder(char *str) {
  assert(str != NULL);
  for (; *str != '\0'; str++)
    if (*str == '\n')
      *str = '\0';
}


x86 assembly (clang, -O0):
<sunder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116b <sunder+0x5b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1155 <sunder+0x45>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    115a <sunder+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112e <sunder+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunder>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
jmp    1137 <sunder+0x27>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0xa,%al
je     1130 <sunder+0x20>
test   %al,%al
jne    1133 <sunder+0x23>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sunder(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
br label %5
5: ; preds = %9, %1
%6 = phi i8* [ %0, %1 ], [ %10, %9 ]
%7 = load i8, i8* %6
switch i8 %7, label %9 [
i8 0, label %11
i8 10, label %8
]
8: ; preds = %5
store i8 0, i8* %6
br label %9
9: ; preds = %5, %8
%10 = getelementptr inbounds i8, i8* %6, i64 1
br label %5
11: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printdir(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Directory scan of /home:\n");
  printdir("/home", 0);
  printf("done. \n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
xor    %esi,%esi
call   1040 <printdir@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
xor    %esi,%esi
call   1040 <printdir@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Directory scan of /home:\0A\00"
@.str.1 = [6 x i8] c"/home\00"
@.str.2 = [8 x i8] c"done. \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"/home\00"
@str = [25 x i8] c"Directory scan of /home:\00"
@str.3 = [7 x i8] c"done. \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x7d() {
  Assert_real((isdigit(125) == 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_isdigit.c",
              630, ("isdigit should be 0 for }"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x276,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for }\00"
define void @t_isdigit_0x7d() {
%1 = call i64 @isdigit(i32 125)
%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 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for }\00"
define void @t_isdigit_0x7d() {
%1 = tail call i64 @isdigit(i32 125)
%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 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int _ceil_log2(int x) {
  int r = (x & (x - 1)) ? 1 : 0;
  while ((x >>= 1) != 0)
    r++;
  return r;
}


x86 assembly (clang, -O0):
<_ceil_log2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1142 <_ceil_log2+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <_ceil_log2+0x22>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ceil_log2>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
setne  %al
cmp    $0x2,%edi
jb     112c <_ceil_log2+0x2c>
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1120 <_ceil_log2+0x20>
ret

LLVM IR (-O0):
define i32 @_ceil_log2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 1
%7 = and i32 %4, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
store i32 %10, i32* %3
br label %11
11: ; preds = %15, %1
%12 = load i32, i32* %2
%13 = ashr i32 %12, 1
store i32 %13, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %11
18: ; preds = %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @_ceil_log2(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ugt i32 %2, 1
%4 = zext i1 %3 to i32
%5 = icmp ult i32 %0, 2
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %10, %6 ], [ %4, %1 ]
%8 = phi i32 [ %9, %6 ], [ %0, %1 ]
%9 = ashr i32 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = icmp ult i32 %8, 4
br i1 %11, label %12, label %6
12: ; preds = %6, %1
%13 = phi i32 [ %4, %1 ], [ %10, %6 ]
ret i32 %13
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t chain(uint64_t n) {
  uint64_t count = 1;
  while (n > 1) {
    count++;
    if (0 == n % 2)
      n /= 2;
    else
      n = (n * 3) + 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<chain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1158 <chain+0x58>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    1149 <chain+0x49>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1153 <chain+0x53>
imul   $0x3,-0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <chain+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chain>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1127 <chain+0x27>
mov    $0x1,%eax
nop
add    $0x1,%eax
mov    %edi,%ecx
shr    %ecx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%edi
cmove  %ecx,%edi
cmp    $0x1,%edi
jg     1110 <chain+0x10>
ret

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

LLVM IR (-O2):
define i32 @chain(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %12, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = and i32 %5, 1
%8 = icmp eq i32 %7, 0
%9 = lshr i32 %5, 1
%10 = mul nsw i32 %5, 3
%11 = add nsw i32 %10, 1
%12 = select i1 %8, i32 %9, i32 %11
%13 = icmp sgt i32 %12, 1
br i1 %13, label %3, label %14
14: ; preds = %3, %1
%15 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %15
}
int test_imm_09uint16_mem(unsigned short *val) {
  return ((*val) & (-0x09 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_09uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xfffffff7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_09uint16_mem>:
movzwl (%rdi),%eax
test   $0xfff7,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_09uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -9
%7 = icmp ne i32 %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_09uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -9
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xcirculate;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcirculate_type(void *_p) {
  return (int)((XEvent *)_p)->xcirculate.type;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xcirculate_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xcirculate_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ buff;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
scalar_t__ system(char *);
int mkdir_r(char *path, unsigned int mode) {
  char buff[1024];
  snprintf(buff, sizeof(buff), "install -d %s", path);
  return system(buff) == 0 ? 0 : -1;
}


x86 assembly (clang, -O0):
<mkdir_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x400,%esi
lea    0xeb7(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_r>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
neg    %rax
sbb    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"install -d %s\00"
define i32 @mkdir_r(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = call i64 @system(i8* %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 -1
ret i32 %13
}

LLVM IR (-O2):
@.str = [14 x i8] c"install -d %s\00"
define i32 @mkdir_r(i8* %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = call i64 @system(i8* %4)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int gzip_inflate(unsigned char *, unsigned int *, unsigned char *,
                 unsigned int);
int Lzma_Decode(unsigned char *dest, unsigned int *destLen, unsigned char *src,
                unsigned int srcLen) {
  int res = gzip_inflate(dest, destLen, src, srcLen);
  return res;
}


x86 assembly (clang, -O0):
<Lzma_Decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <gzip_inflate@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lzma_Decode>:
jmp    1030 <gzip_inflate@plt>

LLVM IR (-O0):
define i32 @Lzma_Decode(i8* %0, i32* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32*, i32** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @gzip_inflate(i8* %10, i32* %11, i8* %12, i32 %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @Lzma_Decode(i8* %0, i32* %1, i8* %2, i32 %3) {
%5 = tail call i32 @gzip_inflate(i8* %0, i32* %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
double fabs(double);
double summation_potential(double q, double radius) {
  return (q / fabs(radius));
}


x86 assembly (clang, -O0):
<summation_potential>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movaps 0xee1(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @summation_potential(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @llvm.fabs.f64(double %6)
%8 = fdiv double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @summation_potential(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %1)
%4 = fdiv double %0, %3
ret double %4
}
void Msp430TimerCapComP__7__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__7__Compare__default__fired() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void on_signalterm(int signal) { printf("signal term received!\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"signal term received!\0A\00"
define void @on_signalterm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"signal term received!\00"
define void @on_signalterm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  printf("Vnesi 2 broja: \n");
  scanf("%d %d", &a, &b);
  printf("Maximum: %d\n", (a > b) ? a : b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1168 <main+0x48>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    116e <main+0x4e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [13 x i8] c"Maximum: %d\0A\00"
@str = [16 x i8] c"Vnesi 2 broja: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
%10 = select i1 %9, i32 %7, i32 %8
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void hex(char *buf, int c) { sprintf(buf, "%02x ", c); }


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%02x \00"
define void @hex(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @hex(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
unsigned char VIM_HAPI_YuvToRgb(unsigned char *, unsigned char *,
                                unsigned short, unsigned short, unsigned char);
unsigned char V5H_Tool_YuvToRgb(unsigned char *pYUV, unsigned char *pRgb,
                                unsigned short Source_Width,
                                unsigned short Source_height,
                                unsigned char Method) {
  {
    return (VIM_HAPI_YuvToRgb(pYUV, pRgb, Source_Width, Source_height, Method));
  }
}


x86 assembly (clang, -O0):
<V5H_Tool_YuvToRgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %dx,-0x12(%rbp)
mov    %cx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%cx
mov    -0x14(%rbp),%ax
movzwl %cx,%edx
movzwl %ax,%ecx
movzbl -0x15(%rbp),%r8d
call   1030 <VIM_HAPI_YuvToRgb@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<V5H_Tool_YuvToRgb>:
jmp    1030 <VIM_HAPI_YuvToRgb@plt>

LLVM IR (-O0):
define zeroext i8 @V5H_Tool_YuvToRgb(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3, i8 zeroext %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i16
%10 = alloca i8
store i8* %0, i8** %6
store i8* %1, i8** %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i8 %4, i8* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i16, i16* %8
%14 = load i16, i16* %9
%15 = load i8, i8* %10
%16 = call zeroext i8 @VIM_HAPI_YuvToRgb(i8* %11, i8* %12, i16 zeroext %13, i16 zeroext %14, i8 zeroext %15)
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @V5H_Tool_YuvToRgb(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3, i8 zeroext %4) {
%6 = tail call zeroext i8 @VIM_HAPI_YuvToRgb(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3, i8 zeroext %4)
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage:\r\n");
  printf("    ecdsa256-keygen [-r] [-s] [-c]\r\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"usage:\0D\0A\00"
@.str.1 = [37 x i8] c" ecdsa256-keygen [-r] [-s] [-c]\0D\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"usage:\0D\00"
@str.2 = [36 x i8] c" ecdsa256-keygen [-r] [-s] [-c]\0D\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int solve_by_quaddobl_Laurent_homotopy_continuation(int number_of_tasks) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(776, &number_of_tasks, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_by_quaddobl_Laurent_homotopy_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x308,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_by_quaddobl_Laurent_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x308,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solve_by_quaddobl_Laurent_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 776, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}