xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t obuf_avail();
int /*<<< orphan*/ term_output_flush();
void obuf_need_space(size_t count) {
  if ((obuf_avail() < count)) {
    term_output_flush();
  }
}


x86 assembly (clang, -O0):
<obuf_need_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <obuf_avail@plt>
cmp    -0x8(%rbp),%rax
jae    1144 <obuf_need_space+0x24>
mov    $0x0,%al
call   1040 <term_output_flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obuf_need_space>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <obuf_avail@plt>
cmp    %rbx,%rax
jae    1138 <obuf_need_space+0x18>
xor    %eax,%eax
pop    %rbx
jmp    1040 <term_output_flush@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @obuf_need_space(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @obuf_avail()
%4 = load i64, i64* %2
%5 = icmp ult i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @term_output_flush()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @obuf_need_space(i64 %0) {
%2 = tail call i64 (...) @obuf_avail()
%3 = icmp ult i64 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @term_output_flush()
br label %6
6: ; preds = %4, %1
ret void
}
int mask_msb(int x, int y) {
  int w = sizeof(int) << 3;
  return (x & ~0xFF) | (y & (0xFF));
}


x86 assembly (clang, -O0):
<mask_msb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff00,%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_msb>:
and    $0xffffff00,%edi
movzbl %sil,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @mask_msb(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 32, i32* %5
%6 = load i32, i32* %3
%7 = and i32 %6, -256
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @mask_msb(i32 %0, i32 %1) {
%3 = and i32 %0, -256
%4 = and i32 %1, 255
%5 = or i32 %4, %3
ret i32 %5
}
int is_parenthesis(char c) { return c == '(' || c == ')'; }


x86 assembly (clang, -O0):
<is_parenthesis>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_parenthesis+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x29,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_parenthesis>:
and    $0xfe,%dil
xor    %eax,%eax
cmp    $0x28,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_parenthesis(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 40
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 41
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_parenthesis(i8 signext %0) {
%2 = and i8 %0, -2
%3 = icmp eq i8 %2, 40
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", f(6)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = call i32 @f(i32 6)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @f(i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int data_getwonder(int);
int data_getwonderside(int);
int wonder_numstages(int player) {
  int side = data_getwonderside(player);
  int wonder = data_getwonder(player);
  if (side == 0)
    return 3;
  if (wonder == 9)
    return 4;
  if (wonder == 3)
    return 2;
  return 3;
}


x86 assembly (clang, -O0):
<wonder_numstages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <data_getwonderside@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <data_getwonder@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1157 <wonder_numstages+0x37>
movl   $0x3,-0x4(%rbp)
jmp    118a <wonder_numstages+0x6a>
cmpl   $0x9,-0x10(%rbp)
jne    116d <wonder_numstages+0x4d>
movl   $0x4,-0x4(%rbp)
jmp    118a <wonder_numstages+0x6a>
cmpl   $0x3,-0x10(%rbp)
jne    1183 <wonder_numstages+0x63>
movl   $0x2,-0x4(%rbp)
jmp    118a <wonder_numstages+0x6a>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wonder_numstages>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <data_getwonderside@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <data_getwonder@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
sete   %cl
xor    $0x3,%ecx
cmp    $0x9,%eax
mov    $0x4,%edx
cmovne %ecx,%edx
test   %ebp,%ebp
mov    $0x3,%eax
cmovne %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @wonder_numstages(i32 %0) {
%2 = tail call i32 @data_getwonderside(i32 %0)
%3 = tail call i32 @data_getwonder(i32 %0)
%4 = icmp eq i32 %2, 0
%5 = icmp eq i32 %3, 3
%6 = select i1 %5, i32 2, i32 3
%7 = icmp eq i32 %3, 9
%8 = select i1 %7, i32 4, i32 %6
%9 = select i1 %4, i32 3, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xb3() {
  Assert_real((isxdigit(179) == 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_isxdigit.c",
              900, ("isxdigit should be 0 for 0xb3"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xb3>:
push   %rax
mov    $0xb3,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x384,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xb3\00"
define void @t_isxdigit_0xb3() {
%1 = call i64 @isxdigit(i32 179)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 900, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xb3\00"
define void @t_isxdigit_0xb3() {
%1 = tail call i64 @isxdigit(i32 179)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 900, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int __ltfloat(float a, float b) { return a < b; }


x86 assembly (clang, -O0):
<__ltfloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ltfloat>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @__ltfloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__ltfloat(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int Tfa98xx_MaxDevices(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @Tfa98xx_MaxDevices() {
ret i32 4
}

LLVM IR (-O2):
define i32 @Tfa98xx_MaxDevices() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _soxr_simd64_aligned_free(void *p1) {
  if (p1)
    free(*((void **)p1 - 1));
}


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

x86 assembly (clang, -O2):
<_soxr_simd64_aligned_free>:
test   %rdi,%rdi
je     111e <_soxr_simd64_aligned_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @_soxr_simd64_aligned_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ scanw(char *, int *);
void consultas() {
  int op = 0;
  clear();
  printw("\t\t\tMENU CONSULTAS\n\n\t1) Consulta General\n\t2) Consulta por "
         "tipo\n\t3) Listado de sabores\n\t4) Menu Principal\n\nIntroduce tu "
         "eleccion:\n>>");
  scanw("%d", &op);
  switch (op) {
  case 1:
    break;
  case 2:
    break;
  case 3:
    break;
  case 4:
    break;
  }
}


x86 assembly (clang, -O0):
<consultas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1050 <clear@plt>
lea    0xec3(%rip),%rdi
call   1030 <printw@plt>
lea    0xf3a(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanw@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     119f <consultas+0x6f>
mov    -0x10(%rbp),%rax
lea    0xe7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    119f <consultas+0x6f>
jmp    119f <consultas+0x6f>
jmp    119f <consultas+0x6f>
jmp    119f <consultas+0x6f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consultas>:
push   %rax
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1050 <clear@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printw@plt>
lea    0xf30(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanw@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [131 x i8] c"\09\09\09MENU CONSULTAS\0A\0A\091) Consulta General\0A\092) Consulta por tipo\0A\093) Listado de sabores\0A\094) Menu Principal\0A\0AIntroduce tu eleccion:\0A>>\00"
@.str.1 = [3 x i8] c"%d\00"
define void @consultas() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @clear()
%3 = call i32 @printw(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
switch i32 %5, label %10 [
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
]
6: ; preds = %0
br label %10
7: ; preds = %0
br label %10
8: ; preds = %0
br label %10
9: ; preds = %0
br label %10
10: ; preds = %0, %9, %8, %7, %6
ret void
}

LLVM IR (-O2):
@.str = [131 x i8] c"\09\09\09MENU CONSULTAS\0A\0A\091) Consulta General\0A\092) Consulta por tipo\0A\093) Listado de sabores\0A\094) Menu Principal\0A\0AIntroduce tu eleccion:\0A>>\00"
@.str.1 = [3 x i8] c"%d\00"
define void @consultas() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (...) @clear()
%4 = tail call i32 @printw(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xfa() {
  Assert_real((isupper(250) == 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_isupper.c",
              1255, ("isupper should be 0 for 0xfa"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xfa>:
push   %rax
mov    $0xfa,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e7,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfa\00"
define void @t_isupper_0xfa() {
%1 = call i64 @isupper(i32 250)
%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 1255, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfa\00"
define void @t_isupper_0xfa() {
%1 = tail call i64 @isupper(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stdbuf();
void __attribute((constructor)) stdbuf_init(void) { stdbuf(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @stdbuf_init, i8* null }]
define void @stdbuf_init() {
%1 = call i32 (...) @stdbuf()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @stdbuf_init, i8* null }]
define void @stdbuf_init() {
%1 = tail call i32 (...) @stdbuf()
ret void
}
void VDP_setVerticalScroll(unsigned short plan, short value) {
  volatile unsigned short *pw;
  volatile unsigned long *pl;
  unsigned short addr;
  pw = (unsigned short *)0xC00000;
  pl = (unsigned long *)0xC00004;
  if (plan == 0xE000)
    addr = 0;
  else
    addr = 2;
  *pl = ((0x4000 + ((addr)&0x3FFF)) << 16) + (((addr) >> 14) | 0x10);
  *pw = value;
}


x86 assembly (clang, -O0):
<VDP_setVerticalScroll>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    $0xc00000,%eax
mov    %rax,-0x10(%rbp)
mov    $0xc00004,%eax
mov    %rax,-0x18(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0xe000,%eax
jne    113e <VDP_setVerticalScroll+0x3e>
movw   $0x0,-0x1a(%rbp)
jmp    1144 <VDP_setVerticalScroll+0x44>
movw   $0x2,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
and    $0x3fff,%eax
add    $0x4000,%eax
shl    $0x10,%eax
movzwl -0x1a(%rbp),%ecx
sar    $0xe,%ecx
or     $0x10,%ecx
add    %ecx,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VDP_setVerticalScroll>:
xor    %eax,%eax
cmp    $0xe000,%edi
setne  %al
shl    $0x11,%rax
or     $0x40000010,%rax
mov    %rax,0xc00004
mov    %si,0xc00000
ret

LLVM IR (-O0):
define void @VDP_setVerticalScroll(i16 zeroext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16*
%6 = alloca i64*
%7 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
store i16* inttoptr (i64 12582912 to i16*), i16** %5
store i64* inttoptr (i64 12582916 to i64*), i64** %6
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %9, 57344
br i1 %10, label %11, label %12
11: ; preds = %2
store i16 0, i16* %7
br label %13
12: ; preds = %2
store i16 2, i16* %7
br label %13
13: ; preds = %12, %11
%14 = load i16, i16* %7
%15 = zext i16 %14 to i32
%16 = and i32 %15, 16383
%17 = add nsw i32 16384, %16
%18 = shl i32 %17, 16
%19 = load i16, i16* %7
%20 = zext i16 %19 to i32
%21 = ashr i32 %20, 14
%22 = or i32 %21, 16
%23 = add nsw i32 %18, %22
%24 = sext i32 %23 to i64
%25 = load i64*, i64** %6
store volatile i64 %24, i64* %25
%26 = load i16, i16* %4
%27 = load i16*, i16** %5
store volatile i16 %26, i16* %27
ret void
}

LLVM IR (-O2):
define void @VDP_setVerticalScroll(i16 zeroext %0, i16 signext %1) {
%3 = icmp eq i16 %0, -8192
%4 = select i1 %3, i64 1073741840, i64 1073872912
store volatile i64 %4, i64* inttoptr (i64 12582916 to i64*)
store volatile i16 %1, i16* inttoptr (i64 12582912 to i16*)
ret void
}
void arithmetic_init_sub(void) { int x = 1 - 1; }


x86 assembly (clang, -O0):
<arithmetic_init_sub>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_event_box_set_above_child() {
ret void
}
float _affine_gap_1_over_3(const int idx_start, const int idx_end) {
  if (idx_start >= idx_end)
    return ((float)0);
  else
    return (((float)1) +
            (((idx_end - 1) - idx_start) * (((float)1) / ((float)3))));
}


x86 assembly (clang, -O0):
<_affine_gap_1_over_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1123 <_affine_gap_1_over_3+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114d <_affine_gap_1_over_3+0x4d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
sub    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xec8(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec0(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_affine_gap_1_over_3>:
cmp    %esi,%edi
jge    111d <_affine_gap_1_over_3+0x1d>
not    %edi
add    %esi,%edi
cvtsi2ss %edi,%xmm0
mulss  0xeec(%rip),%xmm0
addss  0xee8(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @_affine_gap_1_over_3(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store float 0.000000e+00, float* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to float
%16 = call float @llvm.fmuladd.f32(float %15, float 0x3FD5555560000000, float 1.000000e+00)
store float %16, float* %3
br label %17
17: ; preds = %10, %9
%18 = load float, float* %3
ret float %18
}

LLVM IR (-O2):
define float @_affine_gap_1_over_3(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = xor i32 %0, -1
%6 = add i32 %5, %1
%7 = sitofp i32 %6 to float
%8 = tail call float @llvm.fmuladd.f32(float %7, float 0x3FD5555560000000, float 1.000000e+00)
br label %9
9: ; preds = %2, %4
%10 = phi float [ %8, %4 ], [ 0.000000e+00, %2 ]
ret float %10
}
strlen(s) char *s;
{
  int i;
  i = 0;
  while (*s++)
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_metadata_array_create() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

x86 assembly (clang, -O2):
<grpcsharp_metadata_array_create>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_array_create() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_array_create() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int main() {
  while (true) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
scalar_t__ ECHILD;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ SIGTERM;
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int wait(int /*<<< orphan*/ *);
void term_children_and_exit() {
  kill(0, SIGTERM);
  while (1) {
    if ((wait(NULL) == -1) && (errno == ECHILD))
      break;
  }
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<term_children_and_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <wait@plt>
cmp    $0xffffffff,%eax
jne    1175 <term_children_and_exit+0x45>
mov    0x2e7b(%rip),%rax
mov    (%rax),%rax
mov    0x2e61(%rip),%rcx
cmp    (%rcx),%rax
jne    1175 <term_children_and_exit+0x45>
jmp    117a <term_children_and_exit+0x4a>
jmp    1144 <term_children_and_exit+0x14>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<term_children_and_exit>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
mov    0x2e8d(%rip),%r14
mov    0x2e76(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
call   1050 <wait@plt>
cmp    $0xffffffff,%eax
jne    1160 <term_children_and_exit+0x30>
mov    (%r14),%rax
cmp    (%rbx),%rax
jne    1160 <term_children_and_exit+0x30>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
@errno = global i64 0
@ECHILD = global i64 0
@EXIT_FAILURE = global i32 0
define void @term_children_and_exit() {
%1 = load i32, i32* @SIGTERM
%2 = call i32 @kill(i32 0, i32 %1)
br label %3
3: ; preds = %0, %11
%4 = call i32 @wait(i32* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @ECHILD
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %6
br label %12
11: ; preds = %6, %3
br label %3
12: ; preds = %10
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@errno = global i64 0
@ECHILD = global i64 0
@EXIT_FAILURE = global i32 0
define void @term_children_and_exit() {
%1 = load i32, i32* @SIGTERM
%2 = tail call i32 @kill(i32 0, i32 %1)
br label %3
3: ; preds = %10, %0
%4 = tail call i32 @wait(i32* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @ECHILD
%9 = icmp eq i64 %7, %8
br i1 %9, label %11, label %10
10: ; preds = %6, %3
br label %3
11: ; preds = %6
%12 = load i32, i32* @EXIT_FAILURE
%13 = tail call i32 @exit(i32 %12)
unreachable
}
void dl_G_SETSCISSOR() {}


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

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

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

LLVM IR (-O2):
define void @dl_G_SETSCISSOR() {
ret void
}
unsigned int __readl(void *addr) { return *(volatile unsigned int *)addr; }


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

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

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

LLVM IR (-O2):
define i32 @__readl(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
int test_imm_99int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x99 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_99int64_midword_mem>:
testb  $0x99,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_99int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 10027008
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
void alarmHanlder(int signo) { alarm(1); }


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

x86 assembly (clang, -O2):
<alarmHanlder>:
mov    $0x1,%edi
jmp    1030 <alarm@plt>

LLVM IR (-O0):
define void @alarmHanlder(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @alarm(i32 1)
ret void
}

LLVM IR (-O2):
define void @alarmHanlder(i32 %0) {
%2 = tail call i32 @alarm(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char);
int peeksym;
int /*<<< orphan*/ stmt();
int symbol();
int /*<<< orphan*/ xeof;
void stmtlist() {
  extern peeksym, xeof;
  auto o;
  while (!xeof) {
    if ((o = symbol()) == 3)
      return;
    peeksym = o;
    stmt();
  }
  error('$)');
}


x86 assembly (clang, -O0):
<stmtlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
cmpl   $0x0,(%rax)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1154 <stmtlist+0x24>
jmp    1184 <stmtlist+0x54>
mov    $0x0,%al
call   1050 <symbol@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x3,%eax
jne    116c <stmtlist+0x3c>
jmp    118e <stmtlist+0x5e>
mov    -0x4(%rbp),%ecx
mov    0x2e5a(%rip),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <stmt@plt>
jmp    1138 <stmtlist+0x8>
mov    $0x29,%edi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stmtlist>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%rbx
cmpl   $0x0,(%rbx)
jne    116b <stmtlist+0x3b>
mov    0x2e89(%rip),%r14
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <symbol@plt>
cmp    $0x3,%eax
je     117c <stmtlist+0x4c>
mov    %eax,(%r14)
xor    %eax,%eax
call   1030 <stmt@plt>
cmpl   $0x0,(%rbx)
je     1150 <stmtlist+0x20>
mov    $0x29,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@xeof = global i32 0
@peeksym = global i32 0
define void @stmtlist() {
%1 = alloca i32
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* @xeof
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = call i32 (...) @symbol()
store i32 %7, i32* %1
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %6
br label %15
10: ; preds = %6
%11 = load i32, i32* %1
store i32 %11, i32* @peeksym
%12 = call i32 (...) @stmt()
br label %2
13: ; preds = %2
%14 = call i32 @error(i8 signext 41)
br label %15
15: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
@xeof = global i32 0
@peeksym = global i32 0
define void @stmtlist() {
%1 = load i32, i32* @xeof
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %10
3: ; preds = %0, %6
%4 = tail call i32 (...) @symbol()
%5 = icmp eq i32 %4, 3
br i1 %5, label %12, label %6
6: ; preds = %3
store i32 %4, i32* @peeksym
%7 = tail call i32 (...) @stmt()
%8 = load i32, i32* @xeof
%9 = icmp eq i32 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %6, %0
%11 = tail call i32 @error(i8 signext 41)
br label %12
12: ; preds = %3, %10
ret void
}
void gtk_action_set_sensitive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_set_sensitive() {
ret void
}
f() {
  int n = 4, m = 3;
  int a[n][m];
  int(*p)[m] = a;
  p += 1;
  (*p)[2] = 99;
  n = p - a;
  return n;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,%rsp
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    %rdx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rcx,%rsi
shl    $0x0,%rsi
shl    $0x2,%rsi
add    %rsi,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x63,0x8(%rax)
mov    -0x28(%rbp),%rax
sub    %rdx,%rax
shl    $0x2,%rcx
cqto
idiv   %rcx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32*
store i32 4, i32* %1
store i32 3, i32* %2
%7 = load i32, i32* %1
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = mul nuw i64 %8, %10
%13 = alloca i32, i64 %12
store i64 %8, i64* %4
store i64 %10, i64* %5
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
store i32* %13, i32** %6
%16 = load i32*, i32** %6
%17 = mul nsw i64 1, %15
%18 = getelementptr inbounds i32, i32* %16, i64 %17
store i32* %18, i32** %6
%19 = load i32*, i32** %6
%20 = getelementptr inbounds i32, i32* %19, i64 2
store i32 99, i32* %20
%21 = load i32*, i32** %6
%22 = ptrtoint i32* %21 to i64
%23 = ptrtoint i32* %13 to i64
%24 = sub i64 %22, %23
%25 = mul nuw i64 4, %15
%26 = sdiv exact i64 %24, %25
%27 = trunc i64 %26 to i32
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = load i8*, i8** %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @f() {
ret i32 1
}
int main() {
  for (int x = 0; x != 10; x++)
    return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     1122 <main+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %11
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %6, %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int _search(int *, int /*<<< orphan*/, int, int);
int binary_search(int *a, int n, int i) { return _search(a, 0, n - 1, i); }


x86 assembly (clang, -O0):
<binary_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1030 <_search@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_search>:
mov    %edx,%ecx
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <_search@plt>

LLVM IR (-O0):
define i32 @binary_search(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = call i32 @_search(i32* %7, i32 0, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @binary_search(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @_search(i32* %0, i32 0, i32 %4, i32 %2)
ret i32 %5
}
int test_sub_ovf(int x, int y) {
  long long llx = (long long)x;
  long long lly = (long long)y;
  long long lldiff = llx - lly;
  int diff = (int)lldiff;
  return (lldiff != diff);
}


x86 assembly (clang, -O0):
<test_sub_ovf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sub_ovf>:
movslq %edi,%rcx
movslq %esi,%rax
sub    %rax,%rcx
movslq %ecx,%rdx
xor    %eax,%eax
cmp    %rcx,%rdx
setne  %al
ret

LLVM IR (-O0):
define i32 @test_sub_ovf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = sub nsw i64 %13, %14
store i64 %15, i64* %7
%16 = load i64, i64* %7
%17 = trunc i64 %16 to i32
store i32 %17, i32* %8
%18 = load i64, i64* %7
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = icmp ne i64 %18, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @test_sub_ovf(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = sext i32 %1 to i64
%5 = add nsw i64 %3, -2147483648
%6 = sub nsw i64 %5, %4
%7 = icmp ult i64 %6, -4294967296
%8 = zext i1 %7 to i32
ret i32 %8
}
int test_even(int a) { return ((a % 2) == 0); }


x86 assembly (clang, -O0):
<test_even>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_even(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_even(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Type definitions */
struct drm_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdelay(int);
void cdv_intel_wait_for_vblank(struct drm_device *dev) { mdelay(20); }


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

x86 assembly (clang, -O2):
<cdv_intel_wait_for_vblank>:
mov    $0x14,%edi
jmp    1030 <mdelay@plt>

LLVM IR (-O0):
%struct.drm_device = type { i32 }
define void @cdv_intel_wait_for_vblank(%struct.drm_device* %0) {
%2 = alloca %struct.drm_device*
store %struct.drm_device* %0, %struct.drm_device** %2
%3 = call i32 @mdelay(i32 20)
ret void
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
define void @cdv_intel_wait_for_vblank(%struct.drm_device* nocapture readnone %0) {
%2 = tail call i32 @mdelay(i32 20)
ret void
}
/* Variables and functions */
float exp2f(float);
float __ocl_exp2_float(float src) { return exp2f(src); }


x86 assembly (clang, -O0):
<__ocl_exp2_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <exp2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_exp2_float>:
jmp    1030 <exp2f@plt>

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

LLVM IR (-O2):
define float @__ocl_exp2_float(float %0) {
%2 = tail call float @exp2f(float %0)
ret float %2
}
I0AR1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movswl 0x87a22(%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1143 <I0AR1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <I0AR1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AR1>:
xor    %eax,%eax
cmpw   $0x16,0x87a22(%r9)
setge  %al
ret

LLVM IR (-O0):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = getelementptr inbounds i16, i16* %16, i64 277777
%18 = load i16, i16* %17
%19 = sext i16 %18 to i32
%20 = icmp sle i32 22, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %5, i64 277777
%8 = load i16, i16* %7
%9 = icmp sgt i16 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
double ArcSin(double);
double ArcCos(double arg) { return (1.5707963267949 - ArcSin(arg)); }


x86 assembly (clang, -O0):
<ArcCos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ArcSin@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArcCos>:
push   %rax
call   1030 <ArcSin@plt>
movsd  0xee2(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ArcCos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @ArcSin(double %3)
%5 = fsub double 0x3FF921FB54442D28, %4
ret double %5
}

LLVM IR (-O2):
define double @ArcCos(double %0) {
%2 = tail call double @ArcSin(double %0)
%3 = fsub double 0x3FF921FB54442D28, %2
ret double %3
}
unsigned long int mbstowcs(signed int *restrict __dst,
                           const char *restrict __src,
                           unsigned long int __len) {
  unsigned long int return_value___mbstowcs_chk$1;
  unsigned long int return_value___mbstowcs_chk_warn$2;
  unsigned long int return_value___mbstowcs_alias$3;
  return_value___mbstowcs_alias$3 = __mbstowcs_alias(__dst, __src, __len);
  return return_value___mbstowcs_alias$3;
}


x86 assembly (clang, -O0):
<mbstowcs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <__mbstowcs_alias@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @mbstowcs(i32* noalias %0, i8* noalias %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%10 = load i32*, i32** %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @__mbstowcs_alias to i32 (i32*, i8*, i64, ...)*)(i32* %10, i8* %11, i64 %12)
%14 = sext i32 %13 to i64
store i64 %14, i64* %9
%15 = load i64, i64* %9
ret i64 %15
}

LLVM IR (-O2):
define i64 @mbstowcs(i32* noalias %0, i8* noalias %1, i64 %2) {
%4 = tail call i32 (i32*, i8*, i64, ...) bitcast (i32 (...)* @__mbstowcs_alias to i32 (i32*, i8*, i64, ...)*)(i32* %0, i8* %1, i64 %2)
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ keypairgen_program_0(char *);
int /*<<< orphan*/ printf(char *, char *);
main(int argc, char *argv[]) {
  char *host;
  if (argc < 2) {
    printf("usage: %s server_host\n", argv[0]);
    exit(1);
  }
  host = argv[1];
  keypairgen_program_0(host);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1166 <main+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <keypairgen_program_0@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1143 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <keypairgen_program_0@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    (%rsi),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
store i8* %17, i8** %5
%18 = load i8*, i8** %5
%19 = call i32 @keypairgen_program_0(i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @keypairgen_program_0(i8* %10)
ret i32 0
}