xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf1(char *, int);
void spurious_irq(int irq) { printf1("spurious_irq:%x", irq); }


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

x86 assembly (clang, -O2):
<spurious_irq>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf1@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"spurious_irq:%x\00"
define void @spurious_irq(i32 %0) {
%2 = tail call i32 @printf1(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x93() {
  Assert_real((ispunct(147) == 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_ispunct.c",
              740, ("ispunct should be 0 for 0x93"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x93>:
push   %rax
mov    $0x93,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2e4,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x93\00"
define void @t_ispunct_0x93() {
%1 = call i64 @ispunct(i32 147)
%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 740, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x93\00"
define void @t_ispunct_0x93() {
%1 = tail call i64 @ispunct(i32 147)
%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 740, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void free_float2(float **a) {
  free(a[0]);
  free(a);
}


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

x86 assembly (clang, -O2):
<free_float2>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_float2(float** nocapture %0) {
%2 = bitcast float** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast float** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR9F_get(void) { return U_WMRCORENONE_get("U_WMR9F"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR9F\00"
define i32 @U_WMR9F_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR9F\00"
define i32 @U_WMR9F_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int main() {
  int *b;
  int **c;
  c = &b;
  int a[3];
  int *d = a;
  b = d;
  b[1] = 23;
  return a[1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x17,0x4(%rax)
mov    -0x20(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
%4 = alloca [3 x i32]
%5 = alloca i32*
store i32 0, i32* %1
store i32** %2, i32*** %3
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32* %6, i32** %5
%7 = load i32*, i32** %5
store i32* %7, i32** %2
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 23, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 23
}
void RAND_get_rand_method(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_get_rand_method() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int issignaling_f(float x) {
  union {
    float f;
    uint32_t u;
  } u = {.f = x};
  return (u.u & 0x7fffffff) > 0x7f800000 && (u.u & 0x400000) == 0;
}


x86 assembly (clang, -O0):
<issignaling_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
and    $0x7fffffff,%ecx
xor    %eax,%eax
cmp    $0x7f800000,%ecx
mov    %al,-0x9(%rbp)
jle    113e <issignaling_f+0x3e>
mov    -0x8(%rbp),%eax
and    $0x400000,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issignaling_f>:
movd   %xmm0,%eax
mov    %eax,%ecx
and    $0x7fffffff,%ecx
cmp    $0x7f800001,%ecx
setae  %cl
test   $0x400000,%eax
sete   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @issignaling_f(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = bitcast %union.anon* %3 to float*
%5 = load float, float* %2
store float %5, float* %4
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, 2147483647
%9 = icmp sgt i32 %8, 2139095040
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = bitcast %union.anon* %3 to i32*
%12 = load i32, i32* %11
%13 = and i32 %12, 4194304
%14 = icmp eq i32 %13, 0
br label %15
15: ; preds = %10, %1
%16 = phi i1 [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @issignaling_f(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2147483647
%4 = icmp ugt i32 %3, 2139095040
%5 = and i32 %2, 4194304
%6 = icmp eq i32 %5, 0
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int buffer_insertfile(struct buffer **, scalar_t__, int /*<<< orphan*/ *);
scalar_t__ buffer_length(struct buffer *);
int buffer_pushfile(struct buffer **b, FILE *fh) {
  return buffer_insertfile(b, buffer_length(*b) - 1, fh);
}


x86 assembly (clang, -O0):
<buffer_pushfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <buffer_length@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
sub    $0x1,%rsi
mov    -0x10(%rbp),%rdx
call   1030 <buffer_insertfile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_pushfile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <buffer_length@plt>
lea    -0x1(%rax),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <buffer_insertfile@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @buffer_pushfile(%struct.buffer** %0, i32* %1) {
%3 = alloca %struct.buffer**
%4 = alloca i32*
store %struct.buffer** %0, %struct.buffer*** %3
store i32* %1, i32** %4
%5 = load %struct.buffer**, %struct.buffer*** %3
%6 = load %struct.buffer**, %struct.buffer*** %3
%7 = load %struct.buffer*, %struct.buffer** %6
%8 = call i64 @buffer_length(%struct.buffer* %7)
%9 = sub nsw i64 %8, 1
%10 = load i32*, i32** %4
%11 = call i32 @buffer_insertfile(%struct.buffer** %5, i64 %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @buffer_pushfile(%struct.buffer** %0, i32* %1) {
%3 = load %struct.buffer*, %struct.buffer** %0
%4 = tail call i64 @buffer_length(%struct.buffer* %3)
%5 = add nsw i64 %4, -1
%6 = tail call i32 @buffer_insertfile(%struct.buffer** %0, i64 %5, i32* %1)
ret i32 %6
}
/* Variables and functions */
int getpagesize();
int main() {
  if (getpagesize() == 4096)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
cmp    $0x1000,%eax
jne    113d <main+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1144 <main+0x34>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpagesize@plt>
xor    %ecx,%ecx
cmp    $0x1000,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpagesize()
%3 = icmp eq i32 %2, 4096
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getpagesize()
%2 = icmp ne i32 %1, 4096
%3 = zext i1 %2 to i32
ret i32 %3
}
void log_backend(int kind, char *log_buf) {}


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

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

LLVM IR (-O0):
define void @log_backend(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 @log_backend(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int isWhitespace(char theChar) {
  if ((int)theChar <= 32 || (int)theChar > 126) {
    0 && fprintf(stderr, "Removed whitespace '%d'\n", (int)theChar);
    return (1);
  }
  0 && fprintf(stderr, "No whitespace found\n");
  return (0);
}


x86 assembly (clang, -O0):
<isWhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jle    1124 <isWhitespace+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jle    1130 <isWhitespace+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isWhitespace+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhitespace>:
add    $0x81,%dil
xor    %eax,%eax
cmp    $0xa2,%dil
setb   %al
ret

LLVM IR (-O0):
@stderr = global i32 0
define i32 @isWhitespace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 126
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @isWhitespace(i8 signext %0) {
%2 = add i8 %0, -127
%3 = icmp ult i8 %2, -94
%4 = zext i1 %3 to i32
ret i32 %4
}
int fun_in_release_so(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<fun_in_release_so>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_in_release_so>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @fun_in_release_so(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fun_in_release_so(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void rop3_143_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

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

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

LLVM IR (-O2):
define void @rop3_143_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %2, -1
%7 = or i8 %5, %6
%8 = xor i8 %1, -1
%9 = and i8 %8, %2
%10 = and i8 %9, %4
%11 = or i8 %7, %10
store i8 %11, i8* %0
ret void
}
int XGetWMProtocols() {}


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

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

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

LLVM IR (-O2):
define i32 @XGetWMProtocols() {
ret i32 undef
}
void foo173(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo173(i32 %0) {
ret void
}
/* Variables and functions */
char *__strcat(char *, char const *);
char *strcat(char *dest, const char *src) { return __strcat(dest, src); }


x86 assembly (clang, -O0):
<strcat>:
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 <__strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
jmp    1030 <__strcat@plt>

LLVM IR (-O0):
define i8* @strcat(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 = call i8* @__strcat(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* %1) {
%3 = tail call i8* @__strcat(i8* %0, i8* %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ addr_maps_build_file(char const *, size_t, size_t);
char *proc_maps(int /*<<< orphan*/, size_t *, size_t *, int /*<<< orphan*/ *);
void addr_maps_build(pid_t pid) {
  const char *path;
  size_t start, end;
  while ((path = proc_maps(pid, &start, &end, NULL)) != NULL) {
    addr_maps_build_file(path, start, end);
  }
}


x86 assembly (clang, -O0):
<addr_maps_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <proc_maps@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1163 <addr_maps_build+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <addr_maps_build_file@plt>
jmp    112b <addr_maps_build+0xb>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_maps_build>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
xor    %ecx,%ecx
call   1030 <proc_maps@plt>
test   %rax,%rax
je     1175 <addr_maps_build+0x55>
lea    0x8(%rsp),%r14
mov    %rsp,%r15
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
mov    %rax,%rdi
call   1040 <addr_maps_build_file@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %ecx,%ecx
call   1030 <proc_maps@plt>
test   %rax,%rax
jne    1150 <addr_maps_build+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @addr_maps_build(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
br label %6
6: ; preds = %10, %1
%7 = load i32, i32* %2
%8 = call i8* @proc_maps(i32 %7, i64* %4, i64* %5, i32* null)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = call i32 @addr_maps_build_file(i8* %11, i64 %12, i64 %13)
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @addr_maps_build(i32 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i8* @proc_maps(i32 %0, i64* %2, i64* %3, i32* null)
%7 = icmp eq i8* %6, null
br i1 %7, label %15, label %8
8: ; preds = %1, %8
%9 = phi i8* [ %13, %8 ], [ %6, %1 ]
%10 = load i64, i64* %2
%11 = load i64, i64* %3
%12 = call i32 @addr_maps_build_file(i8* %9, i64 %10, i64 %11)
%13 = call i8* @proc_maps(i32 %0, i64* %2, i64* %3, i32* null)
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %8
15: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  int b;
  int c = (a = 1, b = 10);
  printf("%d\n", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec9(%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    $0xa,%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
store i32 1, i32* %1
store i32 10, i32* %2
store i32 10, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
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 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void myprint(int buf[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%08x\n", buf[i]);
  }
}


x86 assembly (clang, -O0):
<myprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <myprint+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <myprint+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myprint>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <myprint+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <myprint+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%08x\0A\00"
define void @myprint(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%08x\0A\00"
define void @myprint(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ play_chess();
int main(int argc, char *argv[]) {
  play_chess();
  return EXIT_SUCCESS;
}


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 <play_chess@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 (...) @play_chess()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @play_chess()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ NRF24_Read_Reg(int /*<<< orphan*/);
int /*<<< orphan*/ NRF24_Write_Reg(int /*<<< orphan*/, int /*<<< orphan*/);
uint8_t NRF24_Reg_ResetBit(uint8_t reg, uint8_t value) {
  uint8_t data;
  data = NRF24_Read_Reg(reg);
  data &= ~value;
  NRF24_Write_Reg(reg, data);
  return data;
}


x86 assembly (clang, -O0):
<NRF24_Reg_ResetBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <NRF24_Read_Reg@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <NRF24_Write_Reg@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NRF24_Reg_ResetBit>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
call   1030 <NRF24_Read_Reg@plt>
mov    %eax,%ebp
not    %ebx
and    %ebx,%ebp
mov    %r14d,%edi
mov    %ebp,%esi
call   1040 <NRF24_Write_Reg@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @NRF24_Reg_ResetBit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @NRF24_Read_Reg(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = xor i32 %8, -1
%10 = load i32, i32* %5
%11 = and i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = call i32 @NRF24_Write_Reg(i32 %12, i32 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @NRF24_Reg_ResetBit(i32 %0, i32 %1) {
%3 = tail call i32 @NRF24_Read_Reg(i32 %0)
%4 = xor i32 %1, -1
%5 = and i32 %3, %4
%6 = tail call i32 @NRF24_Write_Reg(i32 %0, i32 %5)
ret i32 %5
}
void incr_a(int a) {
  int b;
  b = a;
}


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

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

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

LLVM IR (-O2):
define void @incr_a(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ memcpy(int *, int *, int);
int /*<<< orphan*/ sort(int *, int *, int);
void merge_sort(int *arr, int len) {
  int *tmp = malloc(sizeof(int) * len);
  memcpy(tmp, arr, sizeof(int) * len);
  sort(arr, tmp, len);
  free(tmp);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <sort@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
lea    0x0(,%r14,4),%ebp
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1050 <memcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <sort@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i32* @malloc(i32 %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = mul i64 4, %14
%16 = trunc i64 %15 to i32
%17 = call i32 @memcpy(i32* %11, i32* %12, i32 %16)
%18 = load i32*, i32** %3
%19 = load i32*, i32** %5
%20 = load i32, i32* %4
%21 = call i32 @sort(i32* %18, i32* %19, i32 %20)
%22 = load i32*, i32** %5
%23 = call i32 @free(i32* %22)
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32* @malloc(i32 %3)
%5 = tail call i32 @memcpy(i32* %4, i32* %0, i32 %3)
%6 = tail call i32 @sort(i32* %0, i32* %4, i32 %1)
%7 = tail call i32 @free(i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_char(int, unsigned char);
void print_crit_char(unsigned char byte) { __console_tx_char(2, byte); }


x86 assembly (clang, -O0):
<print_crit_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2,%edi
movzbl -0x1(%rbp),%esi
call   1030 <__console_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crit_char>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <__console_tx_char@plt>

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

LLVM IR (-O2):
define void @print_crit_char(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_char(i32 2, i8 zeroext %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int multprec_Newton_step(int deci) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(195, &deci, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @multprec_Newton_step(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 195, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ handle_63(int /*<<< orphan*/);
int gen_63(void) {
  handle_63(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_63>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_63@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_63() {
%1 = call i32 @handle_63(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_63() {
%1 = tail call i32 @handle_63(i32 0)
ret i32 0
}
fgt(x, y) long long int x;
long long int y;
{
  if (x > y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fgt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1126 <fgt+0x26>
movl   $0xd,-0x4(%rbp)
jmp    112d <fgt+0x2d>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgt>:
cmp    %rsi,%rdi
mov    $0xd,%ecx
mov    $0x8c,%eax
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fgt(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i32 13, i32 140
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord1fv(int /*<<< orphan*/ *);
void TexCoord1fv(GLfloat v[1]) { glTexCoord1fv(v); }


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

x86 assembly (clang, -O2):
<TexCoord1fv>:
jmp    1030 <glTexCoord1fv@plt>

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

LLVM IR (-O2):
define void @TexCoord1fv(i32* %0) {
%2 = tail call i32 @glTexCoord1fv(i32* %0)
ret void
}
/* Type definitions */
struct p7_coro_rq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct p7_coro_rq *);
void p7_coro_rq_delete_(struct p7_coro_rq *rq) { free(rq); }


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

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

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

LLVM IR (-O2):
%struct.p7_coro_rq = type { i32 }
define void @p7_coro_rq_delete_(%struct.p7_coro_rq* nocapture %0) {
%2 = tail call i32 @free(%struct.p7_coro_rq* %0)
ret void
}
void escape(void *p) { asm volatile("" : : "g"(p) : "memory"); }


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

x86 assembly (clang, -O2):
<escape>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @escape(i8* %0) {
tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Type definitions */
struct mpd_pair {
  int dummy;
};
struct mpd_connection {
  int dummy;
};

/* Variables and functions */
struct mpd_pair *mpd_recv_pair_named(struct mpd_connection *, char *);
__attribute__((malloc)) struct mpd_pair *
mpd_recv_channel_pair(struct mpd_connection *connection) {
  return mpd_recv_pair_named(connection, "channel");
}


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

x86 assembly (clang, -O2):
<mpd_recv_channel_pair>:
lea    0xee9(%rip),%rsi
jmp    1030 <mpd_recv_pair_named@plt>

LLVM IR (-O0):
%struct.mpd_pair = type { i32 }
%struct.mpd_connection = type { i32 }
@.str = [8 x i8] c"channel\00"
define noalias %struct.mpd_pair* @mpd_recv_channel_pair(%struct.mpd_connection* %0) {
%2 = alloca %struct.mpd_connection*
store %struct.mpd_connection* %0, %struct.mpd_connection** %2
%3 = load %struct.mpd_connection*, %struct.mpd_connection** %2
%4 = call %struct.mpd_pair* @mpd_recv_pair_named(%struct.mpd_connection* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.mpd_pair* %4
}

LLVM IR (-O2):
%struct.mpd_pair = type { i32 }
%struct.mpd_connection = type { i32 }
@.str = [8 x i8] c"channel\00"
define noalias %struct.mpd_pair* @mpd_recv_channel_pair(%struct.mpd_connection* %0) {
%2 = tail call %struct.mpd_pair* @mpd_recv_pair_named(%struct.mpd_connection* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.mpd_pair* %2
}
/* Type definitions */
struct group {
  char *gr_name;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
struct group *getgrgid(int /*<<< orphan*/);
char *get_group_name(gid_t gid) {
  struct group *pg = getgrgid(gid);
  if (!pg)
    return "?";
  return pg->gr_name;
}


x86 assembly (clang, -O0):
<get_group_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <getgrgid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1142 <get_group_name+0x32>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <get_group_name+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_group_name>:
push   %rax
call   1030 <getgrgid@plt>
test   %rax,%rax
je     1120 <get_group_name+0x10>
mov    (%rax),%rax
pop    %rcx
ret
lea    0xed9(%rip),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.group = type { i8* }
@.str = [2 x i8] c"?\00"
define i8* @get_group_name(i32 %0) {
%2 = tail call %struct.group* @getgrgid(i32 %0)
%3 = icmp eq %struct.group* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.group, %struct.group* %2, i64 0, i32 0
%6 = load i8*, i8** %5
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_iterate_backwards() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_iterate_backwards"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"NOT IMPLEMENTED:pa_hashmap_iterate_backwards\0A\00"
define i32 @pa_hashmap_iterate_backwards() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_hashmap_iterate_backwards\00"
define i32 @pa_hashmap_iterate_backwards() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *command) {
  fprintf(stderr, "Usage: %s [-i <iterations>] [-n <no. of threads>]\n",
          command);
}


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):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s [-i <iterations>] [-n <no. of threads>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s [-i <iterations>] [-n <no. of threads>]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int InitSound(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @InitSound() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ system(char *);
void supprLock(char nickname[]) {
  char chaine[100] = {0};
  snprintf(chaine, 100, "rm /home/%s/.session/rtorrent.lock\n", nickname);
  printf("%s", chaine);
  system(chaine);
}


x86 assembly (clang, -O0):
<supprLock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1060 <memset@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x64,%esi
lea    0xe90(%rip),%rdx
call   1050 <snprintf@plt>
lea    -0x70(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <system@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supprLock>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rcx
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe99(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <snprintf@plt>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"rm /home/%s/.session/rtorrent.lock\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @supprLock(i8* %0) {
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* %0, i8** %2
%4 = bitcast [100 x i8]* %3 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @snprintf(i8* %5, i32 100, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%11 = call i32 @system(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"rm /home/%s/.session/rtorrent.lock\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @supprLock(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 100, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ replaceNWordWithStatBuff(char const *, char *, char const *,
                                            char const *, int);
void replaceAllWithStatBuff(const char *input, char *newBuff, const char *old,
                            const char *nw) {
  replaceNWordWithStatBuff(input, newBuff, old, nw, -1);
}


x86 assembly (clang, -O0):
<replaceAllWithStatBuff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%r8d
call   1030 <replaceNWordWithStatBuff@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replaceAllWithStatBuff>:
mov    $0xffffffff,%r8d
jmp    1030 <replaceNWordWithStatBuff@plt>

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

LLVM IR (-O2):
define void @replaceAllWithStatBuff(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @replaceNWordWithStatBuff(i8* %0, i8* %1, i8* %2, i8* %3, i32 -1)
ret void
}
int VALUE(int l) { return (l & 1) ^ 1; }


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

x86 assembly (clang, -O2):
<VALUE>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @VALUE(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
int feldspar_c99_hook(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @feldspar_c99_hook() {
ret i32 0
}
/* Variables and functions */
unsigned short check_read(int, char *);
unsigned short int inw_p(unsigned short int port) {
  return check_read((int)port, "inw_p");
}


x86 assembly (clang, -O0):
<inw_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
lea    0xed6(%rip),%rsi
call   1030 <check_read@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw_p>:
lea    0xee9(%rip),%rsi
jmp    1030 <check_read@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"inw_p\00"
define zeroext i16 @inw_p(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = call zeroext i16 @check_read(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i16 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"inw_p\00"
define zeroext i16 @inw_p(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = tail call zeroext i16 @check_read(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i16 %3
}
void gtk_color_button_get_use_alpha() {}


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

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

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

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