xunge/DecIR huggingface dataset:
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int get_pad_strength(int pi, unsigned pad) {
  return pigpio_command(pi, 103, pad, 0, 1);
}


x86 assembly (clang, -O0):
<get_pad_strength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x67,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pad_strength>:
mov    %esi,%edx
mov    $0x67,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @get_pad_strength(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 = call i32 @pigpio_command(i32 %5, i32 103, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_pad_strength(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 103, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void ejoin_version() {
  puts("@"
       "(#)"
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/ejoin.c"
       " "
       "Sat Jan 22 08:19:10 2022"
       " compiled: "
       "Mar 15 2022"
       " "
       "22:57:04");
}


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

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

LLVM IR (-O0):
@.str = [194 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/ejoin.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:57:04\00"
define void @ejoin_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [194 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/ejoin.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:57:04\00"
define void @ejoin_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ tab;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  float tab[20];
  int tab_size;
  tab_size = sizeof(tab) / sizeof(tab[0]);
  printf("tab_size: %d\n", tab_size);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"tab_size: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x float]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %7
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"tab_size: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 0
}
unsigned long ticks2usec(unsigned long ticks, int division,
                         unsigned int tempo) {
  return (unsigned long)((ticks) * (tempo) / (division));
}


x86 assembly (clang, -O0):
<ticks2usec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   %rcx,%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ticks2usec>:
mov    %edx,%eax
imul   %rdi,%rax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <ticks2usec+0x1b>
xor    %edx,%edx
div    %rcx
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @ticks2usec(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i32, i32* %6
%9 = zext i32 %8 to i64
%10 = mul i64 %7, %9
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = udiv i64 %10, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @ticks2usec(i64 %0, i32 %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = mul i64 %4, %0
%6 = sext i32 %1 to i64
%7 = udiv i64 %5, %6
ret i64 %7
}
extern long _deref(long *ptr) { return *ptr; }


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

x86 assembly (clang, -O2):
<_deref>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @_deref(i64* nocapture %0) {
%2 = load i64, i64* %0
ret i64 %2
}
/* Variables and functions */
int *malloc(int);
int *testMalloc3() {
  int *x = malloc(12);
  int *y = x;
  return y;
}


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

x86 assembly (clang, -O2):
<testMalloc3>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @testMalloc3() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @malloc(i32 12)
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32* %4, i32** %2
%5 = load i32*, i32** %2
ret i32* %5
}

LLVM IR (-O2):
define noalias i32* @testMalloc3() {
%1 = tail call i32* @malloc(i32 12)
ret i32* %1
}
int main(int argc, char *argv[]) { return 77; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4d,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 77
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_weight_wxh(int /*<<< orphan*/ *, int,
                                        int /*<<< orphan*/ *, int, int, int,
                                        int);
void pixel_avg_weight_2x2(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                          int i_stride_pix2, int i_weight1) {
  pixel_avg_weight_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 2, 2,
                       i_weight1);
}


x86 assembly (clang, -O0):
<pixel_avg_weight_2x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%eax
mov    $0x2,%r9d
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1030 <pixel_avg_weight_wxh@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_weight_2x2>:
push   %rax
mov    %r8d,(%rsp)
mov    $0x2,%r8d
mov    $0x2,%r9d
call   1030 <pixel_avg_weight_wxh@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @pixel_avg_weight_2x2(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @pixel_avg_weight_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 2, i32 2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void checkDisk1(void) {
  unsigned res;
  printf("\nIs the disk present?\n");
  res = *(((unsigned *)0xF0400000) + 0);
  printf("yes, CTRL = 0x%x\n", res);
}


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

x86 assembly (clang, -O2):
<checkDisk1>:
push   %rax
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
mov    $0xf0400000,%eax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\0AIs the disk present?\0A\00"
@.str.1 = [18 x i8] c"yes, CTRL = 0x%x\0A\00"
define void @checkDisk1() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* inttoptr (i64 4030726144 to i32*)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"yes, CTRL = 0x%x\0A\00"
@str = [22 x i8] c"\0AIs the disk present?\00"
define void @checkDisk1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* inttoptr (i64 4030726144 to i32*)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
typedef size_t int64_t;

/* Variables and functions */
void swap(int64_t *a, int64_t x, int64_t y) {
  int64_t t;
  t = a[x];
  a[x] = a[y];
  a[y] = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi,%rsi,8),%rax
mov    (%rdi,%rdx,8),%rcx
mov    %rcx,(%rdi,%rsi,8)
mov    %rax,(%rdi,%rdx,8)
ret

LLVM IR (-O0):
define void @swap(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64*, i64** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i64, i64* %8, i64 %9
%11 = load i64, i64* %10
store i64 %11, i64* %7
%12 = load i64*, i64** %4
%13 = load i64, i64* %6
%14 = getelementptr inbounds i64, i64* %12, i64 %13
%15 = load i64, i64* %14
%16 = load i64*, i64** %4
%17 = load i64, i64* %5
%18 = getelementptr inbounds i64, i64* %16, i64 %17
store i64 %15, i64* %18
%19 = load i64, i64* %7
%20 = load i64*, i64** %4
%21 = load i64, i64* %6
%22 = getelementptr inbounds i64, i64* %20, i64 %21
store i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @swap(i64* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i64, i64* %0, i64 %1
%5 = load i64, i64* %4
%6 = getelementptr inbounds i64, i64* %0, i64 %2
%7 = load i64, i64* %6
store i64 %7, i64* %4
store i64 %5, i64* %6
ret void
}
int test_imm_B2uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11665408
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void error(int n) { printf("%d (?) Falsche Eingabe!!\n", n); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"%d (?) Falsche Eingabe!!\0A\00"
define void @error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%d (?) Falsche Eingabe!!\0A\00"
define void @error(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xe0() {
  Assert_real((isxdigit(224) == 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",
              1125, ("isxdigit should be 0 for 0xe0"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xe0>:
push   %rax
mov    $0xe0,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x465,%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 0xe0\00"
define void @t_isxdigit_0xe0() {
%1 = call i64 @isxdigit(i32 224)
%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 1125, 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 0xe0\00"
define void @t_isxdigit_0xe0() {
%1 = tail call i64 @isxdigit(i32 224)
%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 1125, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void main(void) {
  int i = 0, n = 0;
  for (i = 0; i < 256; i++) {
    n++;
    printf("\n%d %c", i, i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1163 <main+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <main+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"\0A%d %c\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int cu2ho(double *, double *, int);
int ho2ro(double *, double *, int);
int cu2ro(double *cu, double *ro, int p) {
  double ho[3];
  int trash;
  trash = cu2ho(cu, ho, p);
  trash = ho2ro(ho, ro, p);
  return 1;
}


x86 assembly (clang, -O0):
<cu2ro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <cu2ho@plt>
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <ho2ro@plt>
mov    %eax,-0x34(%rbp)
mov    $0x1,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cu2ro>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsp,%r15
mov    %r15,%rsi
call   1040 <cu2ho@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <ho2ro@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @cu2ro(double* %0, double* %1, i32 %2) {
%4 = alloca [3 x double]
%5 = bitcast [3 x double]* %4 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%7 = call i32 @cu2ho(double* %0, double* %6, i32 %2)
%8 = call i32 @ho2ro(double* %6, double* %1, i32 %2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_colors();
int /*<<< orphan*/ test_text();
void test() {
  test_text();
  test_colors();
}


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

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

LLVM IR (-O0):
define void @test() {
%1 = call i32 (...) @test_text()
%2 = call i32 (...) @test_colors()
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @test_text()
%2 = tail call i32 (...) @test_colors()
ret void
}
const char *file_get_file_revision(const char *file) {
  (void)file;
  return "0";
}


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

x86 assembly (clang, -O2):
<file_get_file_revision>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i8* @file_get_file_revision(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ oom_adj_to_oom_score_adj(int);
void oom_score_adj_conversion_2(void) { (void)oom_adj_to_oom_score_adj(-18); }


x86 assembly (clang, -O0):
<oom_score_adj_conversion_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffee,%edi
call   1030 <oom_adj_to_oom_score_adj@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<oom_score_adj_conversion_2>:
mov    $0xffffffee,%edi
jmp    1030 <oom_adj_to_oom_score_adj@plt>

LLVM IR (-O0):
define void @oom_score_adj_conversion_2() {
%1 = call i32 @oom_adj_to_oom_score_adj(i32 -18)
ret void
}

LLVM IR (-O2):
define void @oom_score_adj_conversion_2() {
%1 = tail call i32 @oom_adj_to_oom_score_adj(i32 -18)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void help(void) {
  printf("usage: %s\n"
         "  -h, --help           show this help\n"
         "  -c, --config <file>  config file\n"
         "  -d, --daemon         daemonize after initialization\n"
         "  --pidfile <file>     PID file, default: /run/sans.pid\n"
         "  --logfile <file>     log file, default: /var/log/sans.log\n"
         "  -v, --verbose        verbose logging\n"
         "  -u, --nspresolver    use NoStandardPort UDP Resolver\n"
         "  -V, --version        print version and exit\n\n"
         "Bug report: <%s>.\n",
         "sans", "https://github.com/XiaoxiaoPu/sans/issues");
}


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

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
lea    0x107f(%rip),%rsi
lea    0x107d(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [413 x i8] c"usage: %s\0A -h, --help show this help\0A -c, --config <file> config file\0A -d, --daemon daemonize after initialization\0A --pidfile <file> PID file, default: /run/sans.pid\0A --logfile <file> log file, default: /var/log/sans.log\0A -v, --verbose verbose logging\0A -u, --nspresolver use NoStandardPort UDP Resolver\0A -V, --version print version and exit\0A\0ABug report: <%s>.\0A\00"
@.str.1 = [5 x i8] c"sans\00"
@.str.2 = [42 x i8] c"https://github.com/XiaoxiaoPu/sans/issues\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([413 x i8], [413 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [413 x i8] c"usage: %s\0A -h, --help show this help\0A -c, --config <file> config file\0A -d, --daemon daemonize after initialization\0A --pidfile <file> PID file, default: /run/sans.pid\0A --logfile <file> log file, default: /var/log/sans.log\0A -v, --verbose verbose logging\0A -u, --nspresolver use NoStandardPort UDP Resolver\0A -V, --version print version and exit\0A\0ABug report: <%s>.\0A\00"
@.str.1 = [5 x i8] c"sans\00"
@.str.2 = [42 x i8] c"https://github.com/XiaoxiaoPu/sans/issues\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([413 x i8], [413 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dread_ascfile(char const *, double *, double *, int *,
                                 double *);
void DREAD_ASCFILE_C(const char *name, double *t0, double *dt, int *n,
                     double *data) {
  dread_ascfile(name, t0, dt, n, data);
}


x86 assembly (clang, -O0):
<DREAD_ASCFILE_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <dread_ascfile@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DREAD_ASCFILE_C>:
jmp    1030 <dread_ascfile@plt>

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

LLVM IR (-O2):
define void @DREAD_ASCFILE_C(i8* %0, double* %1, double* %2, i32* %3, double* %4) {
%6 = tail call i32 @dread_ascfile(i8* %0, double* %1, double* %2, i32* %3, double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: rm_cr FILE [FILE ...]\n\nRemove carriage return "
                  "character from DOS text files.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"Usage: rm_cr FILE [FILE ...]\0A\0ARemove carriage return character from DOS text files.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"Usage: rm_cr FILE [FILE ...]\0A\0ARemove carriage return character from DOS text files.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned long EEPROMBlockProtectGet(unsigned long ulBlock) {
  DEBUG_ASSERT(
      ulBlock <
      ((((*((volatile unsigned long *)(0x400AF000)))) & 0x07FF0000) >> 16));
  (*((volatile unsigned long *)(0x400AF004))) = ulBlock;
  return ((*((volatile unsigned long *)(0x400AF030))));
}


x86 assembly (clang, -O0):
<EEPROMBlockProtectGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400af000,%ecx
mov    (%rcx),%rcx
and    $0x7ff0000,%rcx
shr    $0x10,%rcx
cmp    %rcx,%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rcx
mov    $0x400af004,%eax
mov    %rcx,(%rax)
mov    $0x400af030,%eax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockProtectGet>:
push   %rbx
mov    %rdi,%rbx
mov    0x400af000,%rax
40
shr    $0x10,%eax
and    $0x7ff,%eax
xor    %edi,%edi
cmp    %rbx,%rax
seta   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,0x400af004
40
mov    0x400af030,%rax
40
pop    %rbx
ret

LLVM IR (-O0):
define i64 @EEPROMBlockProtectGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074458624 to i64*)
%5 = and i64 %4, 134152192
%6 = lshr i64 %5, 16
%7 = icmp ult i64 %3, %6
%8 = zext i1 %7 to i32
%9 = call i32 @DEBUG_ASSERT(i32 %8)
%10 = load i64, i64* %2
store volatile i64 %10, i64* inttoptr (i64 1074458628 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %11
}

LLVM IR (-O2):
define i64 @EEPROMBlockProtectGet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074458624 to i64*)
%3 = lshr i64 %2, 16
%4 = and i64 %3, 2047
%5 = icmp ugt i64 %4, %0
%6 = zext i1 %5 to i32
%7 = tail call i32 @DEBUG_ASSERT(i32 %6)
store volatile i64 %0, i64* inttoptr (i64 1074458628 to i64*)
%8 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %8
}
int compare(const void *f, const void *s) { return *(int *)f - *(int *)s; }


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compare(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ BLKGETSIZE64;
int /*<<< orphan*/ ioctl(int const, int /*<<< orphan*/, size_t *);
size_t blockDeviceSizeFromFD(const int fd) {
  size_t file_size_in_bytes = 0;
  ioctl(fd, BLKGETSIZE64, &file_size_in_bytes);
  return file_size_in_bytes;
}


x86 assembly (clang, -O0):
<blockDeviceSizeFromFD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockDeviceSizeFromFD>:
push   %rax
movq   $0x0,(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@BLKGETSIZE64 = global i32 0
define i64 @blockDeviceSizeFromFD(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @BLKGETSIZE64
%6 = call i32 @ioctl(i32 %4, i32 %5, i64* %3)
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
@BLKGETSIZE64 = global i32 0
define i64 @blockDeviceSizeFromFD(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = load i32, i32* @BLKGETSIZE64
%5 = call i32 @ioctl(i32 %0, i32 %4, i64* %2)
%6 = load i64, i64* %2
ret i64 %6
}
/* Type definitions */
struct stat {
  unsigned int st_mode;
};

/* Variables and functions */
scalar_t__ S_IFDIR;
scalar_t__ stat(char *, struct stat *);
int isdir(char *name) {
  struct stat stat_buff;
  if (stat(name, &stat_buff) != 0)
    return 0;
  if (stat_buff.st_mode & (unsigned)S_IFDIR)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <isdir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116a <isdir+0x5a>
mov    -0x18(%rbp),%eax
mov    0x2e8f(%rip),%rcx
mov    (%rcx),%rcx
and    %ecx,%eax
cmp    $0x0,%eax
je     1163 <isdir+0x53>
movl   $0x1,-0x4(%rbp)
jmp    116a <isdir+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdir>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1125 <isdir+0x15>
pop    %rcx
ret
mov    (%rsp),%ecx
mov    0x2ea9(%rip),%rdx
xor    %eax,%eax
test   %ecx,(%rdx)
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFDIR = global i64 0
define i32 @isdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %18
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = load i64, i64* @S_IFDIR
%13 = trunc i64 %12 to i32
%14 = and i32 %11, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %9
store i32 1, i32* %2
br label %18
17: ; preds = %9
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %8
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFDIR = global i64 0
define i32 @isdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = load i64, i64* @S_IFDIR
%10 = trunc i64 %9 to i32
%11 = and i32 %8, %10
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %6, %1
%15 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fabss(int s, int d) {
  assem_debug("fabss d%d,s%d\n", d, s);
  output_w32(0xeeb00ac0 | ((d & 14) << 11) | ((d & 1) << 22) | ((s & 14) >> 1) |
             ((s & 1) << 5));
}


x86 assembly (clang, -O0):
<emit_fabss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0x8(%rbp),%edi
and    $0xe,%edi
shl    $0xb,%edi
or     $0xeeb00ac0,%edi
mov    -0x8(%rbp),%eax
and    $0x1,%eax
shl    $0x16,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0xe,%eax
sar    $0x1,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x5,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fabss>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%edx
call   1030 <assem_debug@plt>
mov    %ebx,%eax
and    $0xe,%eax
shl    $0xb,%eax
and    $0x1,%ebx
shl    $0x16,%ebx
mov    %ebp,%ecx
shr    %ecx
and    $0x7,%ecx
shl    $0x5,%ebp
movzbl %bpl,%edi
or     %ecx,%edi
or     %ebx,%edi
or     %eax,%edi
or     $0xeeb00ac0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"fabss d%d,s%d\0A\00"
define void @emit_fabss(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @assem_debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = and i32 %8, 14
%10 = shl i32 %9, 11
%11 = or i32 -290452800, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 1
%14 = shl i32 %13, 22
%15 = or i32 %11, %14
%16 = load i32, i32* %3
%17 = and i32 %16, 14
%18 = ashr i32 %17, 1
%19 = or i32 %15, %18
%20 = load i32, i32* %3
%21 = and i32 %20, 1
%22 = shl i32 %21, 5
%23 = or i32 %19, %22
%24 = call i32 @output_w32(i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"fabss d%d,s%d\0A\00"
define void @emit_fabss(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = shl i32 %1, 11
%5 = and i32 %4, 28672
%6 = shl i32 %1, 22
%7 = and i32 %6, 4194304
%8 = lshr i32 %0, 1
%9 = and i32 %8, 7
%10 = shl i32 %0, 5
%11 = and i32 %10, 32
%12 = or i32 %9, %11
%13 = or i32 %12, %7
%14 = or i32 %13, %5
%15 = or i32 %14, -290452800
%16 = tail call i32 @output_w32(i32 %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PIN_IRQ_Handler(int /*<<< orphan*/);
void PIN_INT0_IRQHandler(void) { PIN_IRQ_Handler(0); }


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

x86 assembly (clang, -O2):
<PIN_INT0_IRQHandler>:
xor    %edi,%edi
jmp    1030 <PIN_IRQ_Handler@plt>

LLVM IR (-O0):
define void @PIN_INT0_IRQHandler() {
%1 = call i32 @PIN_IRQ_Handler(i32 0)
ret void
}

LLVM IR (-O2):
define void @PIN_INT0_IRQHandler() {
%1 = tail call i32 @PIN_IRQ_Handler(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int key_put(void *key) {
  assert(key != NULL);
  int *a = (int *)key;
  return a != NULL ? *a : -1;
}


x86 assembly (clang, -O0):
<key_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114f <key_put+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    115c <key_put+0x4c>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <key_put+0x4c>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_put>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
test   %rbx,%rbx
je     112b <key_put+0x1b>
mov    (%rbx),%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @key_put(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
br label %16
15: ; preds = %1
br label %16
16: ; preds = %15, %12
%17 = phi i32 [ %14, %12 ], [ -1, %15 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @key_put(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i8* %0, null
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = bitcast i8* %0 to i32*
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) {
  return isdigit(c) || ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
}


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

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

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

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
void glGetUniformLocation(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetUniformLocation() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void arrayFun(int *x) {
  printf("x[0] = %d\n", x[0]);
  printf("x[1] = %d\n", x[1]);
  printf("x[2] = %d\n", x[2]);
  return;
}


x86 assembly (clang, -O0):
<arrayFun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayFun>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
lea    0xedb(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"x[0] = %d\0A\00"
@.str.1 = [11 x i8] c"x[1] = %d\0A\00"
@.str.2 = [11 x i8] c"x[2] = %d\0A\00"
define void @arrayFun(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret void
}
/* Type definitions */
struct ndm_strvec_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ndm_strvec_remove_at(struct ndm_strvec_t *,
                                        int /*<<< orphan*/);
void ndm_strvec_pop_front(struct ndm_strvec_t *v) {
  ndm_strvec_remove_at(v, 0);
}


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

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

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

LLVM IR (-O2):
%struct.ndm_strvec_t = type { i32 }
define void @ndm_strvec_pop_front(%struct.ndm_strvec_t* %0) {
%2 = tail call i32 @ndm_strvec_remove_at(%struct.ndm_strvec_t* %0, i32 0)
ret void
}
int isdigit(int c) { return (c - '0') < 10; }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
xor    %eax,%eax
cmp    $0x3a,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 48
%5 = icmp slt i32 %4, 10
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = icmp slt i32 %0, 58
%3 = zext i1 %2 to i32
ret i32 %3
}