xunge/DecIR huggingface dataset:
char mark_from_idx(int c) {
  switch (c) {
  case 36:
    return '\'';
  case 37:
    return '.';
  }
  if (c >= 10)
    return c - 10 + 'a';
  return c + '0';
}


x86 assembly (clang, -O0):
<mark_from_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x24,%eax
je     112c <mark_from_idx+0x2c>
jmp    111b <mark_from_idx+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x25,%eax
je     1135 <mark_from_idx+0x35>
jmp    113e <mark_from_idx+0x3e>
movb   $0x27,-0x1(%rbp)
jmp    1162 <mark_from_idx+0x62>
movb   $0x2e,-0x1(%rbp)
jmp    1162 <mark_from_idx+0x62>
cmpl   $0xa,-0x8(%rbp)
jl     1159 <mark_from_idx+0x59>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    1162 <mark_from_idx+0x62>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_from_idx>:
cmp    $0x24,%edi
je     110f <mark_from_idx+0xf>
mov    %edi,%eax
cmp    $0x25,%edi
jne    1112 <mark_from_idx+0x12>
mov    $0x2e,%al
ret
mov    $0x27,%al
ret
cmp    $0xa,%eax
jl     111a <mark_from_idx+0x1a>
add    $0x57,%al
ret
add    $0x30,%al
ret

LLVM IR (-O0):
define signext i8 @mark_from_idx(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 36, label %5
i32 37, label %6
]
5: ; preds = %1
store i8 39, i8* %2
br label %19
6: ; preds = %1
store i8 46, i8* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 10
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 10
%13 = add nsw i32 %12, 97
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %19
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 48
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %19
19: ; preds = %15, %10, %6, %5
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @mark_from_idx(i32 %0) {
switch i32 %0, label %3 [
i32 36, label %10
i32 37, label %2
]
2: ; preds = %1
br label %10
3: ; preds = %1
%4 = icmp sgt i32 %0, 9
%5 = trunc i32 %0 to i8
br i1 %4, label %6, label %8
6: ; preds = %3
%7 = add i8 %5, 87
br label %10
8: ; preds = %3
%9 = add i8 %5, 48
br label %10
10: ; preds = %1, %8, %6, %2
%11 = phi i8 [ %7, %6 ], [ %9, %8 ], [ 46, %2 ], [ 39, %1 ]
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
void ev_break() { getchar(); }


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

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

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

LLVM IR (-O2):
define void @ev_break() {
%1 = tail call i32 (...) @getchar()
ret void
}
void omap_temp_sensor_idle(int idle_state) {}


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

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

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

LLVM IR (-O2):
define void @omap_temp_sensor_idle(i32 %0) {
ret void
}
/* Type definitions */
typedef int __v2di;

/* Variables and functions */
__v2di baz(const __v2di x, const __v2di y) { return x != y; }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @baz(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 ne i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @baz(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ warn(char *, char *);
char *mem_get(unsigned int len) {
  char *mem;
  static short outofmem = 0;
  if ((mem = (char *)malloc(len)) == (char *)0 && !outofmem) {
    outofmem++;
    warn("mem_get()", "Out of memory");
  }
  return (mem);
}


x86 assembly (clang, -O0):
<mem_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1174 <mem_get+0x54>
cmpw   $0x0,0x2ee9(%rip)
jne    1174 <mem_get+0x54>
mov    0x2edc(%rip),%ax
add    $0x1,%ax
mov    %ax,0x2ed1(%rip)
lea    0xe98(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <warn@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_get>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <mem_get+0x31>
testb  $0x1,0x2efd(%rip)
jne    1151 <mem_get+0x31>
movb   $0x1,0x2ef4(%rip)
lea    0xebb(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1030 <warn@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@mem_get.outofmem = internal global i16 0
@.str = [10 x i8] c"mem_get()\00"
@.str.1 = [14 x i8] c"Out of memory\00"
define i8* @mem_get(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = load i16, i16* @mem_get.outofmem
%10 = icmp ne i16 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i16, i16* @mem_get.outofmem
%13 = add i16 %12, 1
store i16 %13, i16* @mem_get.outofmem
%14 = call i32 @warn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %11, %8, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@mem_get.outofmem = internal unnamed_addr global i1 false
@.str = [10 x i8] c"mem_get()\00"
@.str.1 = [14 x i8] c"Out of memory\00"
define i8* @mem_get(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = load i1, i1* @mem_get.outofmem
%5 = select i1 %3, i1 true, i1 %4
br i1 %5, label %8, label %6
6: ; preds = %1
store i1 true, i1* @mem_get.outofmem
%7 = tail call i32 @warn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = inttoptr i64 %2 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ RefreshUpper();
unsigned char con_getch();
unsigned char WaitCharacter(void) {
  RefreshUpper();
  return con_getch();
}


x86 assembly (clang, -O0):
<WaitCharacter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <RefreshUpper@plt>
mov    $0x0,%al
call   1030 <con_getch@plt>
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @WaitCharacter() {
%1 = call i32 (...) @RefreshUpper()
%2 = call zeroext i8 (...) @con_getch()
ret i8 %2
}

LLVM IR (-O2):
define zeroext i8 @WaitCharacter() {
%1 = tail call i32 (...) @RefreshUpper()
%2 = tail call zeroext i8 (...) @con_getch()
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n, triangularNumber;
  triangularNumber = 0;
  for (n = 1; n <= 200; n++) {
    triangularNumber += n;
  }
  printf("The 200th triangular number is %i\n", triangularNumber);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jg     1151 <main+0x41>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea5(%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
mov    $0x4e84,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"The 200th triangular number is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 200
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %8
store i32 %10, i32* %3
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"The 200th triangular number is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 20100)
ret i32 0
}
/* Variables and functions */
scalar_t__ IsLetter(char);
scalar_t__ IsSpecialChar(char);
int IsSecondNickChar(char c) {
  if (IsLetter(c) || IsSpecialChar(c) || (c == '-') ||
      ((c >= '0') && (c <= '9'))) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<IsSecondNickChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <IsLetter@plt>
cmp    $0x0,%rax
jne    117b <IsSecondNickChar+0x5b>
movsbl -0x5(%rbp),%edi
call   1040 <IsSpecialChar@plt>
cmp    $0x0,%rax
jne    117b <IsSecondNickChar+0x5b>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     117b <IsSecondNickChar+0x5b>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1187 <IsSecondNickChar+0x67>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1187 <IsSecondNickChar+0x67>
movl   $0x1,-0x4(%rbp)
jmp    118e <IsSecondNickChar+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsSecondNickChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <IsLetter@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <IsSecondNickChar+0x17>
pop    %rbx
ret
movsbl %bl,%ebx
mov    %ebx,%edi
call   1040 <IsSpecialChar@plt>
test   %rax,%rax
setne  %al
cmp    $0x2d,%bl
sete   %cl
add    $0xd0,%bl
cmp    $0xa,%bl
setb   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IsSecondNickChar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @IsLetter(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call i64 @IsSpecialChar(i8 signext %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 48
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 57
br i1 %22, label %23, label %24
23: ; preds = %19, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19, %15
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @IsSecondNickChar(i8 signext %0) {
%2 = tail call i64 @IsLetter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = tail call i64 @IsSpecialChar(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = icmp eq i8 %0, 45
%8 = or i1 %7, %6
%9 = add i8 %0, -48
%10 = icmp ult i8 %9, 10
%11 = or i1 %10, %8
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %4, %1
%14 = phi i32 [ 1, %1 ], [ %12, %4 ]
ret i32 %14
}
/* Variables and functions */
double ceil(double);
double fabs(double);
double floor(double);
double round_double(double x) {
  return fabs(x) < 0.0 ? ceil(x - 0.5) : floor(x + 0.5);
}


x86 assembly (clang, -O0):
<round_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movaps 0xec7(%rip),%xmm0
pand   %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    116a <round_double+0x4a>
movsd  -0x8(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1181 <round_double+0x61>
movsd  0xe9e(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_double>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @round_double(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = fsub double %7, 5.000000e-01
%9 = call double @llvm.ceil.f64(double %8)
br label %14
10: ; preds = %1
%11 = load double, double* %2
%12 = fadd double %11, 5.000000e-01
%13 = call double @llvm.floor.f64(double %12)
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
ret double %15
}

LLVM IR (-O2):
define double @round_double(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call double @llvm.floor.f64(double %2)
ret double %3
}
int regulator_set_current_limit(struct regulator *regulator, int min_uA,
                                int max_uA) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.regulator = type opaque
define i32 @regulator_set_current_limit(%struct.regulator* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
float lua_check_number(int, char *);
int /*<<< orphan*/ lua_pushnumber(float);
void math_rad(void) {
  float d = lua_check_number(1, "rad");
  lua_pushnumber(d / 180. * 3.14159265358979323846);
}


x86 assembly (clang, -O0):
<math_rad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xedc(%rip),%rsi
call   1030 <lua_check_number@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_rad>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
call   1030 <lua_check_number@plt>
cvtss2sd %xmm0,%xmm0
divsd  0xec2(%rip),%xmm0
mulsd  0xec2(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"rad\00"
define void @math_rad() {
%1 = alloca float
%2 = call float @lua_check_number(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store float %2, float* %1
%3 = load float, float* %1
%4 = fpext float %3 to double
%5 = fdiv double %4, 1.800000e+02
%6 = fmul double %5, 0x400921FB54442D18
%7 = fptrunc double %6 to float
%8 = call i32 @lua_pushnumber(float %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"rad\00"
define void @math_rad() {
%1 = tail call float @lua_check_number(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = fpext float %1 to double
%3 = fdiv double %2, 1.800000e+02
%4 = fmul double %3, 0x400921FB54442D18
%5 = fptrunc double %4 to float
%6 = tail call i32 @lua_pushnumber(float %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_action(char *, char *, int);
scalar_t__ this_object();
scalar_t__ this_player();
void init() {
  if (this_object() == this_player()) {
    add_action("commandHook", "", 1);
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <this_object@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <this_player@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
jne    1172 <init+0x42>
lea    0xe9f(%rip),%rdi
lea    0xea3(%rip),%rsi
mov    $0x1,%edx
call   1050 <add_action@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
xor    %eax,%eax
call   1030 <this_object@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <this_player@plt>
cmp    %rax,%rbx
jne    1160 <init+0x30>
lea    0xeb2(%rip),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x1,%edx
pop    %rbx
jmp    1050 <add_action@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"commandHook\00"
@.str.1 = [1 x i8] zeroinitializer
define void @init() {
%1 = call i64 (...) @this_object()
%2 = call i64 (...) @this_player()
%3 = icmp eq i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @add_action(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"commandHook\00"
@.str.1 = [1 x i8] zeroinitializer
define void @init() {
%1 = tail call i64 (...) @this_object()
%2 = tail call i64 (...) @this_player()
%3 = icmp eq i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @add_action(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %6
6: ; preds = %4, %0
ret void
}
/* Type definitions */
struct inputfile {
  int dummy;
};

/* Variables and functions */
char const *get_token_white_char(struct inputfile *, char);
const char *get_token_comma(struct inputfile *inf) {
  return get_token_white_char(inf, ',');
}


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

x86 assembly (clang, -O2):
<get_token_comma>:
mov    $0x2c,%esi
jmp    1030 <get_token_white_char@plt>

LLVM IR (-O0):
%struct.inputfile = type { i32 }
define i8* @get_token_comma(%struct.inputfile* %0) {
%2 = alloca %struct.inputfile*
store %struct.inputfile* %0, %struct.inputfile** %2
%3 = load %struct.inputfile*, %struct.inputfile** %2
%4 = call i8* @get_token_white_char(%struct.inputfile* %3, i8 signext 44)
ret i8* %4
}

LLVM IR (-O2):
%struct.inputfile = type { i32 }
define i8* @get_token_comma(%struct.inputfile* %0) {
%2 = tail call i8* @get_token_white_char(%struct.inputfile* %0, i8 signext 44)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int distance = 100;
  printf("You are %d miles away.\n", distance);
  printf("Hello world\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@.str.1 = [13 x i8] c"Hello world\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
%7 = load i32, i32* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ testSocket(char **, char *);
void main(int argc, char *argv[]) {
  char buff[3];
  testSocket(argv, buff);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x13(%rbp),%rsi
call   1030 <testSocket@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsi,%rdi
lea    0x5(%rsp),%rsi
call   1030 <testSocket@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [3 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%8 = call i32 @testSocket(i8** %6, i8* %7)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = call i32 @testSocket(i8** %1, i8* %4)
ret void
}
int IsStdEndian() {
  static const int a = 0x01;
  return *(const char *)&a == 0x01;
}


x86 assembly (clang, -O0):
<IsStdEndian>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xef5(%rip),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@IsStdEndian.a = internal constant i32 1
define i32 @IsStdEndian() {
%1 = load i8, i8* bitcast (i32* @IsStdEndian.a to i8*)
%2 = sext i8 %1 to i32
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @IsStdEndian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ plot_comm(double (*)(double), double, double, int, char *,
                             char *);
void plot1(double f(double), double x0, double xf, int n, char *buffer) {
  plot_comm(f, x0, xf, n, buffer, "");
}


x86 assembly (clang, -O0):
<plot1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
lea    0xeb7(%rip),%rcx
call   1030 <plot_comm@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plot1>:
lea    0xee9(%rip),%rcx
jmp    1030 <plot_comm@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @plot1(double (double)* %0, double %1, double %2, i32 %3, i8* %4) {
%6 = alloca double (double)*
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca i8*
store double (double)* %0, double (double)** %6
store double %1, double* %7
store double %2, double* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load double (double)*, double (double)** %6
%12 = load double, double* %7
%13 = load double, double* %8
%14 = load i32, i32* %9
%15 = load i8*, i8** %10
%16 = call i32 @plot_comm(double (double)* %11, double %12, double %13, i32 %14, i8* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @plot1(double (double)* %0, double %1, double %2, i32 %3, i8* %4) {
%6 = tail call i32 @plot_comm(double (double)* %0, double %1, double %2, i32 %3, i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
double *dvector(nl, nh)
int nl, nh;
{
  double *v;
  v = (double *)malloc((unsigned)(nh - nl + 1) * sizeof(double));
  return (v - nl);
}


x86 assembly (clang, -O0):
<dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvector>:
push   %rbx
mov    %edi,%ebx
sub    %edi,%esi
lea    0x1(%rsi),%edi
shl    $0x3,%rdi
call   1030 <malloc@plt>
movslq %ebx,%rcx
shl    $0x3,%rcx
sub    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define double* @dvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = call i8* @malloc(i64 %11)
%13 = bitcast i8* %12 to double*
store double* %13, double** %5
%14 = load double*, double** %5
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = sub i64 0, %16
%18 = getelementptr inbounds double, double* %14, i64 %17
ret double* %18
}

LLVM IR (-O2):
define noalias double* @dvector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = zext i32 %4 to i64
%6 = shl nuw nsw i64 %5, 3
%7 = tail call i8* @malloc(i64 %6)
%8 = bitcast i8* %7 to double*
%9 = sext i32 %0 to i64
%10 = sub nsw i64 0, %9
%11 = getelementptr inbounds double, double* %8, i64 %10
ret double* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int no_op(FILE *sfp, FILE *tfp, int c) { return 0; }


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

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

LLVM IR (-O0):
define i32 @no_op(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @no_op(i32* nocapture readnone %0, i32* nocapture readnone %1, i32 %2) {
ret i32 0
}
char *to_upper_b(char *string) {
  char *start = string;
  while (*string != '\0') {
    if (*string >= 'a' && *string <= 'z')
      *string += ('A' - 'a');
    string++;
  }
  return start;
}


x86 assembly (clang, -O0):
<to_upper_b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115d <to_upper_b+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     114c <to_upper_b+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     114c <to_upper_b+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0xffffffe0,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <to_upper_b+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_upper_b>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <to_upper_b+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <to_upper_b+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <to_upper_b+0x2c>
lea    -0x61(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <to_upper_b+0x10>
add    $0xe0,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <to_upper_b+0x10>
ret

LLVM IR (-O0):
define i8* @to_upper_b(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %26, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = load i8*, i8** %2
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 122
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = add nsw i32 %23, -32
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %26
26: ; preds = %20, %15, %10
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %2
br label %5
29: ; preds = %5
%30 = load i8*, i8** %3
ret i8* %30
}

LLVM IR (-O2):
define i8* @to_upper_b(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nsw i8 %5, -32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
int test_imm_B9uint32_reg(unsigned int val) {
  return ((val) & (0xB9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B9uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xb9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_B9uint32_reg(i32 %0) {
%2 = and i32 %0, 185
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x26() {
  Assert_real((isalnum(38) == 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_isalnum.c",
              195, ("isalnum should be 0 for &"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x26>:
push   %rax
mov    $0x26,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xc3,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for &\00"
define void @t_isalnum_0x26() {
%1 = call i64 @isalnum(i32 38)
%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 195, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for &\00"
define void @t_isalnum_0x26() {
%1 = tail call i64 @isalnum(i32 38)
%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 195, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M32_f(char *s) {
  debug("M32_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M32_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M32_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M32_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M32_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M32_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M32_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct fmap {
  int dummy;
};

/* Variables and functions */
int fmap_print(struct fmap *);
int fmap_print_test(struct fmap *fmap) { return fmap_print(fmap); }


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

x86 assembly (clang, -O2):
<fmap_print_test>:
jmp    1030 <fmap_print@plt>

LLVM IR (-O0):
%struct.fmap = type { i32 }
define i32 @fmap_print_test(%struct.fmap* %0) {
%2 = alloca %struct.fmap*
store %struct.fmap* %0, %struct.fmap** %2
%3 = load %struct.fmap*, %struct.fmap** %2
%4 = call i32 @fmap_print(%struct.fmap* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.fmap = type { i32 }
define i32 @fmap_print_test(%struct.fmap* %0) {
%2 = tail call i32 @fmap_print(%struct.fmap* %0)
ret i32 %2
}
/* Variables and functions */
int send(int, void *, size_t, int /*<<< orphan*/);
int send_data(int sock, void *buffer, size_t buffer_size) {
  return send(sock, buffer, buffer_size, 0);
}


x86 assembly (clang, -O0):
<send_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_data>:
xor    %ecx,%ecx
jmp    1030 <send@plt>

LLVM IR (-O0):
define i32 @send_data(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @send(i32 %7, i8* %8, i64 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @send_data(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ time_test01();
int main(int argc, char **argv) {
  time_test01();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <time_test01@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @time_test01()
ret i32 0
}
/* Variables and functions */
void *dynarr_resize(void *, int /*<<< orphan*/);
void *dynarr_clear(void *da) { return dynarr_resize(da, 0); }


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

x86 assembly (clang, -O2):
<dynarr_clear>:
xor    %esi,%esi
jmp    1030 <dynarr_resize@plt>

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

LLVM IR (-O2):
define i8* @dynarr_clear(i8* %0) {
%2 = tail call i8* @dynarr_resize(i8* %0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int zeroinfnan(uint32_t ix) { return 2 * ix - 1 >= 2u * 0x7f800000 - 1; }


x86 assembly (clang, -O0):
<zeroinfnan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cmp    $0xfeffffff,%eax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroinfnan>:
lea    (%rdi,%rdi,1),%ecx
add    $0x1000000,%ecx
xor    %eax,%eax
cmp    $0x1000001,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @zeroinfnan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = sub nsw i32 %4, 1
%6 = icmp uge i32 %5, -16777217
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @zeroinfnan(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add i32 %2, 16777216
%4 = icmp ult i32 %3, 16777217
%5 = zext i1 %4 to i32
ret i32 %5
}
double dround(double x) {
  if ((x - (int)x) >= 0.5)
    return (double)((int)x + 1.);
  return (double)((int)x);
}


x86 assembly (clang, -O0):
<dround>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xedd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     114c <dround+0x4c>
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115a <dround+0x5a>
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dround>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm2
subsd  %xmm2,%xmm0
movsd  0xeec(%rip),%xmm3
addsd  %xmm2,%xmm3
movsd  0xee8(%rip),%xmm1
cmpnlesd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dround(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fsub double %4, %7
%9 = fcmp oge double %8, 5.000000e-01
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load double, double* %3
%12 = fptosi double %11 to i32
%13 = sitofp i32 %12 to double
%14 = fadd double %13, 1.000000e+00
store double %14, double* %2
br label %19
15: ; preds = %1
%16 = load double, double* %3
%17 = fptosi double %16 to i32
%18 = sitofp i32 %17 to double
store double %18, double* %2
br label %19
19: ; preds = %15, %10
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @dround(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
%5 = fcmp ult double %4, 5.000000e-01
%6 = fadd double %3, 1.000000e+00
%7 = select i1 %5, double %3, double %6
ret double %7
}
/* Variables and functions */
scalar_t__ is_identifier(char *);
int is_group_token(char *s) {
  if (*s == '$' || *s == '.' || is_identifier(s))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_group_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
je     114f <is_group_token+0x3f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     114f <is_group_token+0x3f>
mov    -0x10(%rbp),%rdi
call   1030 <is_identifier@plt>
cmp    $0x0,%rax
je     115b <is_group_token+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <is_group_token+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_group_token>:
push   %rax
mov    (%rdi),%cl
mov    $0x1,%eax
cmp    $0x24,%cl
je     1122 <is_group_token+0x12>
cmp    $0x2e,%cl
jne    1124 <is_group_token+0x14>
pop    %rcx
ret
call   1030 <is_identifier@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_group_token(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %3 [
i8 36, label %7
i8 46, label %7
]
3: ; preds = %1
%4 = tail call i64 @is_identifier(i8* %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1, %1
%8 = phi i32 [ 1, %1 ], [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
void av_image_fill_linesizes() {}


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

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

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

LLVM IR (-O2):
define void @av_image_fill_linesizes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_aux_muart_transfer(int);
void bcm2835_aux_muart_transfernb(char *tbuf) {
  while (*tbuf) {
    bcm2835_aux_muart_transfer(*tbuf);
    tbuf++;
  }
  bcm2835_aux_muart_transfer(0x0d);
  bcm2835_aux_muart_transfer(0x0a);
}


x86 assembly (clang, -O0):
<bcm2835_aux_muart_transfernb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <bcm2835_aux_muart_transfernb+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <bcm2835_aux_muart_transfer@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <bcm2835_aux_muart_transfernb+0xc>
mov    $0xd,%edi
call   1030 <bcm2835_aux_muart_transfer@plt>
mov    $0xa,%edi
call   1030 <bcm2835_aux_muart_transfer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcm2835_aux_muart_transfernb>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <bcm2835_aux_muart_transfernb+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <bcm2835_aux_muart_transfer@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <bcm2835_aux_muart_transfernb+0x10>
mov    $0xd,%edi
call   1030 <bcm2835_aux_muart_transfer@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <bcm2835_aux_muart_transfer@plt>

LLVM IR (-O0):
define void @bcm2835_aux_muart_transfernb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = call i32 @bcm2835_aux_muart_transfer(i32 %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
%15 = call i32 @bcm2835_aux_muart_transfer(i32 13)
%16 = call i32 @bcm2835_aux_muart_transfer(i32 10)
ret void
}

LLVM IR (-O2):
define void @bcm2835_aux_muart_transfernb(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @bcm2835_aux_muart_transfer(i32 %7)
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @bcm2835_aux_muart_transfer(i32 13)
%14 = tail call i32 @bcm2835_aux_muart_transfer(i32 10)
ret void
}
void cleanup() { return; }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
ret void
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, int);
bool streq(const char *input, const char *pattern) {
  if (strlen(input) <= 5) {
    return !strncmp(input, pattern, 5);
  } else {
    return !strncmp(input, pattern, 6);
  }
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x5,%eax
jg     1169 <streq+0x49>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    118b <streq+0x6b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
xor    %ecx,%ecx
cmp    $0x6,%eax
setl   %cl
mov    $0x6,%edx
sub    %ecx,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, 6
%5 = select i1 %4, i32 5, i32 6
%6 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %5)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
int psci_init(void) {}


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

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

LLVM IR (-O0):
define i32 @psci_init() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @psci_init() {
ret i32 undef
}
void ftx_error(char *str) { (void)str; }


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

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

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

LLVM IR (-O2):
define void @ftx_error(i8* nocapture %0) {
ret void
}