xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_159() {
  Assert_real((isqrt(159) == 12),
              "/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/stdlib/isqrt.c",
              800, ("Integer square root of 159 should be 12"));
}


x86 assembly (clang, -O0):
<t_sqrt_159>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9f,%edi
call   1030 <isqrt@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x320,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_159>:
push   %rax
mov    $0x9f,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x320,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 159 should be 12\00"
define void @t_sqrt_159() {
%1 = call i32 @isqrt(i32 159)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 159 should be 12\00"
define void @t_sqrt_159() {
%1 = tail call i32 @isqrt(i32 159)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int /*<<< orphan*/ towupper(int /*<<< orphan*/);
wint_t __towupper_l(wint_t c, locale_t l) { return towupper(c); }


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

x86 assembly (clang, -O2):
<__towupper_l>:
jmp    1030 <towupper@plt>

LLVM IR (-O0):
define i32 @__towupper_l(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 = call i32 @towupper(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__towupper_l(i32 %0, i32 %1) {
%3 = tail call i32 @towupper(i32 %0)
ret i32 %3
}
int default_min_brightness(struct backlight *b) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.backlight = type opaque
define i32 @default_min_brightness(%struct.backlight* nocapture readnone %0) {
ret i32 0
}
void val_delete_ffunc(void *v) { (void)v; }


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

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

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

LLVM IR (-O2):
define void @val_delete_ffunc(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int);
int main() {
  int rand1;
  printf("\nBeginning Random Number Generation from the numbers 1-6....\n");
  srand(997);
  rand1 = rand() % 6 + 1;
  printf("\nThe Random Number is: %d\n\n", rand1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3e5,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec8(%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    0xed4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3e5,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe78(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"\0ABeginning Random Number Generation from the numbers 1-6....\0A\00"
@.str.1 = [28 x i8] c"\0AThe Random Number is: %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @srand(i32 997)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"\0AThe Random Number is: %d\0A\0A\00"
@str = [61 x i8] c"\0ABeginning Random Number Generation from the numbers 1-6....\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @srand(i32 997)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
void XcmsTekHVCQueryMinV() {}


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

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

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

LLVM IR (-O2):
define void @XcmsTekHVCQueryMinV() {
ret void
}
int globus_hashtable_voidp_keyeq(void *voidp1, void *voidp2) {
  return (voidp1 == voidp2);
}


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

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

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

LLVM IR (-O2):
define i32 @globus_hashtable_voidp_keyeq(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void reverse(int *nums, int lo, int hi) {
  while (lo < hi) {
    int tmp = nums[lo];
    nums[lo] = nums[hi];
    nums[hi] = tmp;
    lo++;
    hi--;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    112e <reverse+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

LLVM IR (-O0):
define void @reverse(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %8
8: ; preds = %12, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %36
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @reverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ str_del_a_r_char(char *, char);
int main() {
  char str_0[] = "I am working at    Singapore.";
  str_del_a_r_char(str_0, ' ');
  printf("%s\n", str_0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec3(%rip),%ax
mov    %ax,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x20,%esi
call   1030 <str_del_a_r_char@plt>
lea    -0x20(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movups 0xee2(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <str_del_a_r_char@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str_0 = [30 x i8] c"I am working at Singapore.\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = bitcast [30 x i8]* %1 to i8*
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%4 = call i32 @str_del_a_r_char(i8* %3, i8 signext 32)
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str_0 = [30 x i8] c"I am working at Singapore.\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @str_del_a_r_char(i8* %2, i8 signext 32)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void f(void) {
  _Complex float cf;
  int i;
  cf = 0;
  i = cf;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca { float, float }
%2 = alloca i32
%3 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 0
%4 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 1
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
%5 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 0
%6 = load float, float* %5
%7 = fptosi float %6 to i32
store i32 %7, i32* %2
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryBytes() {
ret void
}
int h2o_tolower(int ch) { return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch; }


x86 assembly (clang, -O0):
<h2o_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x41,%eax
cmp    -0x4(%rbp),%eax
jg     112d <h2o_tolower+0x2d>
cmpl   $0x5a,-0x4(%rbp)
jg     112d <h2o_tolower+0x2d>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <h2o_tolower+0x33>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @h2o_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 65, %3
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @h2o_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void onSpecialChar(FILE *out_fp, const char ch) {
  if (ch == '&') {
    fprintf(out_fp, "&amp;");
  } else if (ch == '<') {
    fprintf(out_fp, "&lt;");
  }
}


x86 assembly (clang, -O0):
<onSpecialChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x26,%eax
jne    1144 <onSpecialChar+0x34>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1166 <onSpecialChar+0x56>
movsbl -0x9(%rbp),%eax
cmp    $0x3c,%eax
jne    1161 <onSpecialChar+0x51>
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1166 <onSpecialChar+0x56>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onSpecialChar>:
mov    %rdi,%rcx
cmp    $0x3c,%sil
je     1135 <onSpecialChar+0x25>
cmp    $0x26,%sil
jne    114b <onSpecialChar+0x3b>
lea    0xeda(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>
lea    0xeca(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>
ret

LLVM IR (-O0):
@.str = [6 x i8] c"&amp;\00"
@.str.1 = [5 x i8] c"&lt;\00"
define void @onSpecialChar(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 38
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %19
11: ; preds = %2
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 60
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32*, i32** %3
%17 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %15, %11
br label %19
19: ; preds = %18, %8
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"&amp;\00"
@.str.1 = [5 x i8] c"&lt;\00"
define void @onSpecialChar(i32* nocapture %0, i8 signext %1) {
switch i8 %1, label %7 [
i8 38, label %3
i8 60, label %5
]
3: ; preds = %2
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5, i64 1, i32* %0)
br label %7
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 4, i64 1, i32* %0)
br label %7
7: ; preds = %2, %5, %3
ret void
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_uart2(void) { gpio_mode((struct gpio *)0x40010800, 2, 3 | 8); }


x86 assembly (clang, -O0):
<gpio_uart2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010800,%edi
mov    $0x2,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_uart2>:
mov    $0x40010800,%edi
mov    $0x2,%esi
mov    $0xb,%edx
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_uart2() {
%1 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 2, i32 11)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_uart2() {
%1 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 2, i32 11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ t3(long long);
long long t4(void) {
  long long i;
  t3((i = 4096) + 0x7fffffffULL);
  return i;
}


x86 assembly (clang, -O0):
<t4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x1000,-0x8(%rbp)
mov    $0x80000fff,%edi
call   1030 <t3@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t4>:
push   %rax
mov    $0x80000fff,%edi
call   1030 <t3@plt>
mov    $0x1000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @t4() {
%1 = alloca i64
store i64 4096, i64* %1
%2 = call i32 @t3(i64 2147487743)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @t4() {
%1 = tail call i32 @t3(i64 2147487743)
ret i64 4096
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void usage(const char *app) { fprintf(stdout, "Usage:\n\t%s <ip>\n", app); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"Usage:\0A\09%s <ip>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"Usage:\0A\09%s <ip>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pal_pmu_cycle_counter_start();
void val_measurement_start() { pal_pmu_cycle_counter_start(); }


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

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

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

LLVM IR (-O2):
define void @val_measurement_start() {
%1 = tail call i32 (...) @pal_pmu_cycle_counter_start()
ret void
}
/* Type definitions */
struct ll_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_node(struct ll_node *, void *);
void destroy_node(struct ll_node *node, void *param) {
  print_node(node, param);
}


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

x86 assembly (clang, -O2):
<destroy_node>:
jmp    1030 <print_node@plt>

LLVM IR (-O0):
%struct.ll_node = type { i32 }
define void @destroy_node(%struct.ll_node* %0, i8* %1) {
%3 = alloca %struct.ll_node*
%4 = alloca i8*
store %struct.ll_node* %0, %struct.ll_node** %3
store i8* %1, i8** %4
%5 = load %struct.ll_node*, %struct.ll_node** %3
%6 = load i8*, i8** %4
%7 = call i32 @print_node(%struct.ll_node* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.ll_node = type { i32 }
define void @destroy_node(%struct.ll_node* %0, i8* %1) {
%3 = tail call i32 @print_node(%struct.ll_node* %0, i8* %1)
ret void
}
/* Variables and functions */
double sigma2t(double);
double sigma_na(double X, double Y) {
  double sigma = sigma2t(X + Y) - sigma2t(X) - sigma2t(Y);
  if (sigma < 0.0) {
    sigma = 0.;
  }
  return (sigma);
}


x86 assembly (clang, -O0):
<sigma_na>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <sigma2t@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sigma2t@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sigma2t@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1182 <sigma_na+0x72>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma_na>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
addsd  %xmm1,%xmm0
call   1030 <sigma2t@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sigma2t@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sigma2t@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
maxsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sigma_na(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
%9 = call double @sigma2t(double %8)
%10 = load double, double* %3
%11 = call double @sigma2t(double %10)
%12 = fsub double %9, %11
%13 = load double, double* %4
%14 = call double @sigma2t(double %13)
%15 = fsub double %12, %14
store double %15, double* %5
%16 = load double, double* %5
%17 = fcmp olt double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %2
store double 0.000000e+00, double* %5
br label %19
19: ; preds = %18, %2
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @sigma_na(double %0, double %1) {
%3 = fadd double %0, %1
%4 = tail call double @sigma2t(double %3)
%5 = tail call double @sigma2t(double %0)
%6 = fsub double %4, %5
%7 = tail call double @sigma2t(double %1)
%8 = fsub double %6, %7
%9 = fcmp olt double %8, 0.000000e+00
%10 = select i1 %9, double 0.000000e+00, double %8
ret double %10
}
void DebugMain_Finish(void) {}


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

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

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

LLVM IR (-O2):
define void @DebugMain_Finish() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sumsq = 0, sum = 0, i;
  for (i = 1; i <= 100; i++) {
    sumsq += i * i;
    sum += i;
  }
  printf("%d\n", sum * sum - sumsq);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jg     1162 <main+0x52>
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <main+0x24>
mov    -0xc(%rbp),%esi
imul   -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xe8d(%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    $0x17ff976,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
store i32 %13, i32* %2
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
br label %17
17: ; preds = %8
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i32, i32* %3
%22 = load i32, i32* %3
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %2
%25 = sub nsw i32 %23, %24
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 25164150)
ret i32 0
}
int n(void) {
  long unsigned int strlen(const char *s);
  return strlen("12345");
}


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

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

LLVM IR (-O0):
define i32 @n() {
ret i32 5
}

LLVM IR (-O2):
define i32 @n() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *appli) {
  printf("%s have to be started with the address and the port number of the "
         "server and the string to send\n",
         appli);
  printf("example: %s \"127.0.0.1\" 10000 \"status\"   will start a client "
         "connected on the server 127.0.0.1:10000 and send the string status\n",
         appli);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [97 x i8] c"%s have to be started with the address and the port number of the server and the string to send\0A\00"
@.str.1 = [129 x i8] c"example: %s \22127.0.0.1\22 10000 \22status\22 will start a client connected on the server 127.0.0.1:10000 and send the string status\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [97 x i8] c"%s have to be started with the address and the port number of the server and the string to send\0A\00"
@.str.1 = [129 x i8] c"example: %s \22127.0.0.1\22 10000 \22status\22 will start a client connected on the server 127.0.0.1:10000 and send the string status\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_();
void do0x18() { _I8080_(); }


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

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

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

LLVM IR (-O2):
define void @do0x18() {
%1 = tail call i32 (...) @_I8080_()
ret void
}
int cairo_code_draw_lushLabel_get_height() { return 41; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_lushLabel_get_height() {
ret i32 41
}

LLVM IR (-O2):
define i32 @cairo_code_draw_lushLabel_get_height() {
ret i32 41
}
/* Type definitions */
typedef int /*<<< orphan*/ id_t;
typedef enum __priority_which {
  ____Placeholder___priority_which
} __priority_which;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getpriority(enum __priority_which which, id_t who) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getpriority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpriority>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getpriority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getpriority(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
void _M2_coord_init(__attribute__((unused)) int argc,
                    __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_coord_init(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __env_rm_add(int /*<<< orphan*/, int /*<<< orphan*/);
char **__environ;
int clearenv() {
  char **e = __environ;
  __environ = 0;
  if (e)
    while (*e)
      __env_rm_add(*e++, 0);
  return 0;
}


x86 assembly (clang, -O0):
<clearenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ecb(%rip),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x8(%rbp)
je     1177 <clearenv+0x67>
jmp    1144 <clearenv+0x34>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1172 <clearenv+0x62>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <__env_rm_add@plt>
jmp    1144 <clearenv+0x34>
jmp    1177 <clearenv+0x67>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearenv>:
push   %rbx
mov    0x2ee0(%rip),%rax
mov    (%rax),%rbx
movq   $0x0,(%rax)
test   %rbx,%rbx
je     1153 <clearenv+0x43>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     1153 <clearenv+0x43>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %esi,%esi
call   1030 <__env_rm_add@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <clearenv+0x30>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@__environ = global i8** null
define i32 @clearenv() {
%1 = load i8**, i8*** @__environ
store i8** null, i8*** @__environ
%2 = icmp eq i8** %1, null
br i1 %2, label %15, label %3
3: ; preds = %0
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %13, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %1, %3 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = ptrtoint i8* %7 to i64
%11 = trunc i64 %10 to i32
%12 = tail call i32 @__env_rm_add(i32 %11, i32 0)
%13 = load i8*, i8** %9
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %6
15: ; preds = %6, %3, %0
ret i32 0
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *hashtable_get_item(struct t_hashtable *, void const *,
                                       int /*<<< orphan*/ *);
int hashtable_has_key(struct t_hashtable *hashtable, const void *key) {
  return (hashtable_get_item(hashtable, key, NULL) != NULL) ? 1 : 0;
}


x86 assembly (clang, -O0):
<hashtable_has_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <hashtable_get_item@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_has_key>:
push   %rax
xor    %edx,%edx
call   1030 <hashtable_get_item@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.t_hashtable = type { i32 }
define i32 @hashtable_has_key(%struct.t_hashtable* %0, i8* %1) {
%3 = alloca %struct.t_hashtable*
%4 = alloca i8*
store %struct.t_hashtable* %0, %struct.t_hashtable** %3
store i8* %1, i8** %4
%5 = load %struct.t_hashtable*, %struct.t_hashtable** %3
%6 = load i8*, i8** %4
%7 = call i32* @hashtable_get_item(%struct.t_hashtable* %5, i8* %6, i32* null)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
define i32 @hashtable_has_key(%struct.t_hashtable* %0, i8* %1) {
%3 = tail call i32* @hashtable_get_item(%struct.t_hashtable* %0, i8* %1, i32* null)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ is_decimal_char(char);
int is_hexadecimal_char(char blah) {
  return (is_decimal_char(blah) || (blah >= 'A' && blah <= 'F') ||
          (blah >= 'a' && blah <= 'f'));
}


x86 assembly (clang, -O0):
<is_hexadecimal_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_decimal_char@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    117d <is_hexadecimal_char+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1158 <is_hexadecimal_char+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x46,%ecx
mov    %al,-0x2(%rbp)
jle    117d <is_hexadecimal_char+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1177 <is_hexadecimal_char+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x66,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hexadecimal_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_decimal_char@plt>
test   %rax,%rax
setne  %al
and    $0xdf,%bl
add    $0xbf,%bl
cmp    $0x6,%bl
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_hexadecimal_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_decimal_char(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %24, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 70
br i1 %13, label %24, label %14
14: ; preds = %10, %6
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sge i32 %16, 97
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 102
br label %22
22: ; preds = %18, %14
%23 = phi i1 [ false, %14 ], [ %21, %18 ]
br label %24
24: ; preds = %22, %10, %1
%25 = phi i1 [ true, %10 ], [ true, %1 ], [ %23, %22 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_hexadecimal_char(i8 signext %0) {
%2 = tail call i64 @is_decimal_char(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ e_php();
void e_php_accu() { e_php(); }


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

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

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

LLVM IR (-O2):
define void @e_php_accu() {
%1 = tail call i32 (...) @e_php()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  printf("Hello World!\n");
  sleep(10);
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sleep(i32 10)
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 10)
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int);
int is_hexa_char(int c) {
  return (isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
}


x86 assembly (clang, -O0):
<is_hexa_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <is_hexa_char+0x5d>
cmpl   $0x61,-0x4(%rbp)
jl     114e <is_hexa_char+0x3e>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <is_hexa_char+0x5d>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <is_hexa_char+0x57>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hexa_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_hexa_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 102
br i1 %11, label %20, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 70
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9, %1
%21 = phi i1 [ true, %9 ], [ true, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_hexa_char(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
void foo() {
  char *str = "xxx";
  int positive = (-1 < 0 ? - -1 : -1);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"xxx\00"
define void @foo() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i32 1, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s3c2410_write_addr(unsigned int);
int /*<<< orphan*/ s3c2440_write_addr_lp(unsigned int);
void write_addr(unsigned int addr) {
  if (((*(volatile unsigned int *)0x560000B0) == 0x32410000) ||
      ((*(volatile unsigned int *)0x560000B0) == 0x32410002)) {
    s3c2410_write_addr(addr);
  } else {
    s3c2440_write_addr_lp(addr);
  }
}


x86 assembly (clang, -O0):
<write_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x560000b0,%eax
mov    (%rax),%eax
cmp    $0x32410000,%eax
je     114f <write_addr+0x2f>
mov    $0x560000b0,%eax
mov    (%rax),%eax
cmp    $0x32410002,%eax
jne    115c <write_addr+0x3c>
mov    -0x4(%rbp),%edi
call   1040 <s3c2410_write_addr@plt>
jmp    1164 <write_addr+0x44>
mov    -0x4(%rbp),%edi
call   1030 <s3c2440_write_addr_lp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_addr>:
mov    0x560000b0,%eax
cmp    $0x32410000,%eax
je     113c <write_addr+0x1c>
mov    0x560000b0,%eax
cmp    $0x32410002,%eax
jne    1141 <write_addr+0x21>
jmp    1040 <s3c2410_write_addr@plt>
jmp    1030 <s3c2440_write_addr_lp@plt>

LLVM IR (-O0):
define void @write_addr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i32, i32* inttoptr (i64 1442840752 to i32*)
%4 = icmp eq i32 %3, 843120640
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1442840752 to i32*)
%7 = icmp eq i32 %6, 843120642
br i1 %7, label %8, label %11
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = call i32 @s3c2410_write_addr(i32 %9)
br label %14
11: ; preds = %5
%12 = load i32, i32* %2
%13 = call i32 @s3c2440_write_addr_lp(i32 %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
define void @write_addr(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 1442840752 to i32*)
%3 = icmp eq i32 %2, 843120640
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load volatile i32, i32* inttoptr (i64 1442840752 to i32*)
%6 = icmp eq i32 %5, 843120642
br i1 %6, label %7, label %9
7: ; preds = %4, %1
%8 = tail call i32 @s3c2410_write_addr(i32 %0)
br label %11
9: ; preds = %4
%10 = tail call i32 @s3c2440_write_addr_lp(i32 %0)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int ENXIO;
int pm8921_is_usb_chg_plugged_in(void) { return -ENXIO; }


x86 assembly (clang, -O0):
<pm8921_is_usb_chg_plugged_in>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8921_is_usb_chg_plugged_in>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @pm8921_is_usb_chg_plugged_in() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @pm8921_is_usb_chg_plugged_in() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}
char *strfill(char *s, int n, char fill) {
  while (n--)
    *s++ = fill;
  return s;
}


x86 assembly (clang, -O0):
<strfill>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     113d <strfill+0x3d>
mov    -0xd(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1110 <strfill+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strfill>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
je     1137 <strfill+0x27>
mov    %esi,%ebx
mov    %esi,%eax
movzbl %dl,%esi
mov    %r14,%rdi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0xffffffff,%ebx
add    %rbx,%r14
add    $0x1,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strfill(i8* writeonly %0, i32 %1, i8 signext %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = add i32 %1, -1
%8 = zext i32 %7 to i64
%9 = add nuw nsw i64 %8, 1
%10 = getelementptr i8, i8* %0, i64 %9
br label %11
11: ; preds = %5, %3
%12 = phi i8* [ %0, %3 ], [ %10, %5 ]
ret i8* %12
}