xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int main(void) {
  uint8_t a = 2;
  uint8_t b = 23;
again:
  if (a & b) {
    b--;
    goto again;
  } else {
    a--;
  }
  a += b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x17,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1136 <main+0x36>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%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
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 23, i32* %3
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = and i32 %5, %6
%8 = icmp ne i32 %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* %2
%14 = add nsw i32 %13, -1
store i32 %14, i32* %2
br label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = add nsw i32 %17, %16
store i32 %18, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xcb() {
  Assert_real((isalnum(203) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1020, ("isalnum should be 0 for 0xcb"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xcb>:
push   %rax
mov    $0xcb,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3fc,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xcb\00"
define void @t_isalnum_0xcb() {
%1 = call i64 @isalnum(i32 203)
%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 1020, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xcb\00"
define void @t_isalnum_0xcb() {
%1 = tail call i64 @isalnum(i32 203)
%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 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char getIRQflag(char flags[]) { return flags[8 - 3]; }


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

x86 assembly (clang, -O2):
<getIRQflag>:
mov    0x5(%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @getIRQflag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 5
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getIRQflag(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load i8, i8* %2
ret i8 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ randLIB_get_n_bytes_random(int /*<<< orphan*/ *, int);
uint16_t randLIB_get_16bit(void) {
  uint16_t ret_val;
  randLIB_get_n_bytes_random((uint8_t *)&ret_val, 2);
  return ret_val;
}


x86 assembly (clang, -O0):
<randLIB_get_16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
mov    $0x2,%esi
call   1030 <randLIB_get_n_bytes_random@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randLIB_get_16bit>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
call   1030 <randLIB_get_n_bytes_random@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @randLIB_get_16bit() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @randLIB_get_n_bytes_random(i32* %1, i32 2)
%4 = load i32, i32* %1
ret i32 %4
}
const char *get_protocol(unsigned char protocol) {
  switch (protocol) {
  case 1:
    return "ICMP";
  case 6:
    return "TCP";
  case 17:
    return "UDP";
  }
  return "OTHER";
}


x86 assembly (clang, -O0):
<get_protocol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1141 <get_protocol+0x41>
jmp    111f <get_protocol+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     1151 <get_protocol+0x51>
jmp    1130 <get_protocol+0x30>
mov    -0x10(%rbp),%eax
sub    $0x11,%eax
je     1161 <get_protocol+0x61>
jmp    1171 <get_protocol+0x71>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <get_protocol+0x7c>
lea    0xead(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <get_protocol+0x7c>
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <get_protocol+0x7c>
lea    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_protocol>:
cmp    $0x1,%dil
je     111a <get_protocol+0x1a>
cmp    $0x11,%dil
je     1122 <get_protocol+0x22>
cmp    $0x6,%dil
jne    112a <get_protocol+0x2a>
lea    0xeec(%rip),%rax
ret
lea    0xedf(%rip),%rax
ret
lea    0xee0(%rip),%rax
ret
lea    0xedc(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ICMP\00"
@.str.1 = [4 x i8] c"TCP\00"
@.str.2 = [4 x i8] c"UDP\00"
@.str.3 = [6 x i8] c"OTHER\00"
define i8* @get_protocol(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %9 [
i32 1, label %6
i32 6, label %7
i32 17, label %8
]
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"ICMP\00"
@.str.1 = [4 x i8] c"TCP\00"
@.str.2 = [4 x i8] c"UDP\00"
@.str.3 = [6 x i8] c"OTHER\00"
define i8* @get_protocol(i8 zeroext %0) {
switch i8 %0, label %4 [
i8 1, label %5
i8 6, label %2
i8 17, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
void gtk_window_fullscreen() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_fullscreen() {
ret void
}
int test_imm_23uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x23 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_23uint64_highword_reg>:
movabs $0x2300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_23uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 35
%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_23uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 150323855360
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
void Selective_FdSet(int fd, fd_set *s) { FD_SET(fd, s); }


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

x86 assembly (clang, -O2):
<Selective_FdSet>:
jmp    1030 <FD_SET@plt>

LLVM IR (-O0):
define void @Selective_FdSet(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 @FD_SET(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @Selective_FdSet(i32 %0, i32* %1) {
%3 = tail call i32 @FD_SET(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  long sum = 0;
  printf("VOLATILE not set: ");
  for (long ii = 1; ii <= 100000000L; ++ii) {
    sum += ii;
  }
  printf("%ld\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x1,-0x18(%rbp)
cmpq   $0x5f5e100,-0x18(%rbp)
05
jg     1168 <main+0x58>
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113d <main+0x2d>
mov    -0x10(%rbp),%rsi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"VOLATILE not set: \00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 5000000050000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nrf_write(int, unsigned char const *, int);
void __attribute__((unused)) nrf_rx_addr_p0(const unsigned char *addr) {
  nrf_write(0x20 | 0x0A, addr, 5);
}


x86 assembly (clang, -O0):
<nrf_rx_addr_p0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2a,%edi
mov    $0x5,%edx
call   1030 <nrf_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_rx_addr_p0>:
mov    %rdi,%rsi
mov    $0x2a,%edi
mov    $0x5,%edx
jmp    1030 <nrf_write@plt>

LLVM IR (-O0):
define void @nrf_rx_addr_p0(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @nrf_write(i32 42, i8* %3, i32 5)
ret void
}

LLVM IR (-O2):
define void @nrf_rx_addr_p0(i8* %0) {
%2 = tail call i32 @nrf_write(i32 42, i8* %0, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_putc(char);
void debug_print_str(const char *s) {
  char c;
  while (c = *s++) {
    debug_putc(c);
  }
}


x86 assembly (clang, -O0):
<debug_print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1146 <debug_print_str+0x36>
movsbl -0x9(%rbp),%edi
call   1030 <debug_putc@plt>
jmp    111c <debug_print_str+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @debug_print_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
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
store i8 %7, i8* %3
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i8, i8* %3
%11 = call i32 @debug_putc(i8 signext %10)
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @debug_print_str(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 i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @debug_putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void robPrintMessage(int num) {
  printf("Will Bryan and Garret Becker ");
  int i = 0;
  for (i; i < num; i++) {
    printf("really ");
  }
  printf("love robots!\n");
}


x86 assembly (clang, -O0):
<robPrintMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <robPrintMessage+0x44>
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <robPrintMessage+0x1e>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<robPrintMessage>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
jle    114d <robPrintMessage+0x2d>
lea    0xee1(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <robPrintMessage+0x20>
lea    0xed2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [30 x i8] c"Will Bryan and Garret Becker \00"
@.str.1 = [8 x i8] c"really \00"
@str = [13 x i8] c"love robots!\00"
define void @robPrintMessage(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *checked_malloc(size_t len) {
  void *p = malloc(len);
  if (p == NULL) {
    fprintf(stderr, "Impossible d'allouer la mémoire\n");
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<checked_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <checked_malloc+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <checked_malloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Impossible d'allouer la m\C3\A9moire\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @checked_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Impossible d'allouer la m\C3\A9moire\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @checked_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
double fisSMf(double, double *);
double fisZMf(double, double *);
double fisPiMf(double x, double *params) {
  return (fisSMf(x, params) * fisZMf(x, params + 2));
}


x86 assembly (clang, -O0):
<fisPiMf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1040 <fisSMf@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1030 <fisZMf@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisPiMf>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1040 <fisSMf@plt>
movsd  %xmm0,0x8(%rsp)
add    $0x10,%rbx
movsd  (%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <fisZMf@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fisPiMf(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = call double @fisSMf(double %5, double* %6)
%8 = load double, double* %3
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 2
%11 = call double @fisZMf(double %8, double* %10)
%12 = fmul double %7, %11
ret double %12
}

LLVM IR (-O2):
define double @fisPiMf(double %0, double* %1) {
%3 = tail call double @fisSMf(double %0, double* %1)
%4 = getelementptr inbounds double, double* %1, i64 2
%5 = tail call double @fisZMf(double %0, double* %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char **, char const *, int);
void update_table(const char *choice, const char *pins, char table[][2][5],
                  int entry) {
  memcpy(&(table[entry][0]), choice, 5);
  memcpy(&(table[entry][1]), pins, 5);
}


x86 assembly (clang, -O0):
<update_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x1c(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    $0x5,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rdi
movslq -0x1c(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rdi
add    $0x5,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_table>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rsi
movslq %ecx,%rax
lea    (%rax,%rax,4),%rbx
lea    (%rdx,%rbx,2),%rdi
mov    $0x5,%edx
call   1030 <memcpy@plt>
lea    (%r15,%rbx,2),%rdi
add    $0x5,%rdi
mov    %r14,%rsi
mov    $0x5,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @update_table(i8* %0, i8* %1, [2 x [5 x i8]]* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [2 x [5 x i8]]*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store [2 x [5 x i8]]* %2, [2 x [5 x i8]]** %7
store i32 %3, i32* %8
%9 = load [2 x [5 x i8]]*, [2 x [5 x i8]]** %7
%10 = load i32, i32* %8
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %9, i64 %11
%13 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %12, i64 0, i64 0
%14 = bitcast [5 x i8]* %13 to i8**
%15 = load i8*, i8** %5
%16 = call i32 @memcpy(i8** %14, i8* %15, i32 5)
%17 = load [2 x [5 x i8]]*, [2 x [5 x i8]]** %7
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %17, i64 %19
%21 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %20, i64 0, i64 1
%22 = bitcast [5 x i8]* %21 to i8**
%23 = load i8*, i8** %6
%24 = call i32 @memcpy(i8** %22, i8* %23, i32 5)
ret void
}

LLVM IR (-O2):
define void @update_table(i8* %0, i8* %1, [2 x [5 x i8]]* %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %2, i64 %5
%7 = bitcast [2 x [5 x i8]]* %6 to i8**
%8 = tail call i32 @memcpy(i8** %7, i8* %0, i32 5)
%9 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %2, i64 %5, i64 1
%10 = bitcast [5 x i8]* %9 to i8**
%11 = tail call i32 @memcpy(i8** %10, i8* %1, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("k91-irc C IRC Bot Project\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"k91-irc C IRC Bot Project\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"k91-irc C IRC Bot Project\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void size_t_swap(size_t i, size_t j, size_t *array) {
  size_t hold;
  hold = array[i];
  array[i] = array[j];
  array[j] = hold;
}


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

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

LLVM IR (-O0):
define void @size_t_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** %6
%9 = load i64, i64* %4
%10 = getelementptr inbounds i64, i64* %8, i64 %9
%11 = load i64, i64* %10
store i64 %11, i64* %7
%12 = load i64*, i64** %6
%13 = load i64, i64* %5
%14 = getelementptr inbounds i64, i64* %12, i64 %13
%15 = load i64, i64* %14
%16 = load i64*, i64** %6
%17 = load i64, i64* %4
%18 = getelementptr inbounds i64, i64* %16, i64 %17
store i64 %15, i64* %18
%19 = load i64, i64* %7
%20 = load i64*, i64** %6
%21 = load i64, i64* %5
%22 = getelementptr inbounds i64, i64* %20, i64 %21
store i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @size_t_swap(i64 %0, i64 %1, i64* nocapture %2) {
%4 = getelementptr inbounds i64, i64* %2, i64 %0
%5 = load i64, i64* %4
%6 = getelementptr inbounds i64, i64* %2, i64 %1
%7 = load i64, i64* %6
store i64 %7, i64* %4
store i64 %5, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vprintf(char *, char *, int, int, int *, int);
void scan(char *form, int a, int b, int c) {
  vprintf((char *)-1, form, a, b, &c, 0x100000);
}


x86 assembly (clang, -O0):
<scan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0xffffffffffffffff,%rdi
lea    -0x14(%rbp),%r8
mov    $0x100000,%r9d
call   1030 <vprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan>:
push   %rax
mov    %edx,%eax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %ecx,0x4(%rsp)
lea    0x4(%rsp),%r8
mov    $0xffffffffffffffff,%rdi
mov    %eax,%ecx
mov    $0x100000,%r9d
call   1030 <vprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @scan(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @vprintf(i8* inttoptr (i64 -1 to i8*), i8* %9, i32 %10, i32 %11, i32* %8, i32 1048576)
ret void
}

LLVM IR (-O2):
define void @scan(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
store i32 %3, i32* %5
%6 = call i32 @vprintf(i8* inttoptr (i64 -1 to i8*), i8* %0, i32 %1, i32 %2, i32* %5, i32 1048576)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_cpy();
int /*<<< orphan*/ test_idx();
int /*<<< orphan*/ test_int();
int /*<<< orphan*/ test_long();
int /*<<< orphan*/ test_match();
int /*<<< orphan*/ test_real();
int /*<<< orphan*/ test_split();
int /*<<< orphan*/ test_trim();
int main() {
  test_cpy();
  test_int();
  test_long();
  test_real();
  test_idx();
  test_trim();
  test_split();
  test_match();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_cpy@plt>
mov    $0x0,%al
call   10a0 <test_int@plt>
mov    $0x0,%al
call   1080 <test_long@plt>
mov    $0x0,%al
call   1040 <test_real@plt>
mov    $0x0,%al
call   1090 <test_idx@plt>
mov    $0x0,%al
call   1050 <test_trim@plt>
mov    $0x0,%al
call   1070 <test_split@plt>
mov    $0x0,%al
call   1030 <test_match@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_cpy@plt>
xor    %eax,%eax
call   10a0 <test_int@plt>
xor    %eax,%eax
call   1080 <test_long@plt>
xor    %eax,%eax
call   1040 <test_real@plt>
xor    %eax,%eax
call   1090 <test_idx@plt>
xor    %eax,%eax
call   1050 <test_trim@plt>
xor    %eax,%eax
call   1070 <test_split@plt>
xor    %eax,%eax
call   1030 <test_match@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_cpy()
%3 = call i32 (...) @test_int()
%4 = call i32 (...) @test_long()
%5 = call i32 (...) @test_real()
%6 = call i32 (...) @test_idx()
%7 = call i32 (...) @test_trim()
%8 = call i32 (...) @test_split()
%9 = call i32 (...) @test_match()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_cpy()
%2 = tail call i32 (...) @test_int()
%3 = tail call i32 (...) @test_long()
%4 = tail call i32 (...) @test_real()
%5 = tail call i32 (...) @test_idx()
%6 = tail call i32 (...) @test_trim()
%7 = tail call i32 (...) @test_split()
%8 = tail call i32 (...) @test_match()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar();
main() {
  bar();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @bar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
ret i32 0
}
int ft_is_delimeter(char c) {
  return (c == ' ' || c == '\0' || c == '	' || c == '\n');
}


x86 assembly (clang, -O0):
<ft_is_delimeter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <ft_is_delimeter+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     114d <ft_is_delimeter+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <ft_is_delimeter+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_delimeter>:
cmp    $0x20,%dil
ja     1120 <ft_is_delimeter+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000201,%rdx
bt     %rcx,%rdx
jae    1120 <ft_is_delimeter+0x20>
ret
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ft_is_delimeter(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, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 9
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @ft_is_delimeter(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 9, label %5
i8 0, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
scalar_t__ mem_read_8(int);
uint16_t mem_read_16(uint16_t addr) {
  return (uint16_t)mem_read_8(addr) + ((uint16_t)mem_read_8(addr + 1) << 8);
}


x86 assembly (clang, -O0):
<mem_read_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mem_read_8@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <mem_read_8@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
shl    $0x8,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_read_16>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <mem_read_8@plt>
mov    %rax,%r14
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <mem_read_8@plt>
shl    $0x8,%eax
add    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @mem_read_16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @mem_read_8(i32 %3)
%5 = trunc i64 %4 to i32
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = call i64 @mem_read_8(i32 %7)
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 8
%11 = add nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @mem_read_16(i32 %0) {
%2 = tail call i64 @mem_read_8(i32 %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %0, 1
%5 = tail call i64 @mem_read_8(i32 %4)
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = add nsw i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void key(unsigned char key, int x, int y) {
  if (key == '\033')
    exit(0);
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    1138 <key+0x28>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
cmp    $0x1b,%dil
je     1117 <key+0x7>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @key(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 27
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @key(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
int f2(int a) {
  int v1 = (a == 1);
  int v2 = (a == 2);
  int v3 = (a == 3);
  int v4 = (a == 4);
  return v1 || v2 || v3 || v4;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x15(%rbp)
jne    117a <f2+0x7a>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x15(%rbp)
jne    117a <f2+0x7a>
mov    $0x1,%al
cmpl   $0x0,-0x10(%rbp)
mov    %al,-0x15(%rbp)
jne    117a <f2+0x7a>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x4,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @f2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 2
%12 = zext i1 %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 3
%15 = zext i1 %14 to i32
store i32 %15, i32* %5
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 4
%18 = zext i1 %17 to i32
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %30, label %21
21: ; preds = %1
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %30, label %24
24: ; preds = %21
%25 = load i32, i32* %5
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %24
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
br label %30
30: ; preds = %27, %24, %21, %1
%31 = phi i1 [ true, %24 ], [ true, %21 ], [ true, %1 ], [ %29, %27 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @f2(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 4
%4 = zext i1 %3 to i32
ret i32 %4
}
int main(int argc, char **argv) {
  argc += 1;
  argc -= 1;
  argc *= 2;
  argc /= 2;
  argc %= 2;
  argc <<= 1;
  argc >>= 1;
  argc |= 1;
  argc &= 1;
  argc ^= 1;
  return argc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%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
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = mul nsw i32 %10, 2
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = sdiv i32 %12, 2
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = srem i32 %14, 2
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = shl i32 %16, 1
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = ashr i32 %18, 1
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = or i32 %20, 1
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = and i32 %22, 1
store i32 %23, i32* %4
%24 = load i32, i32* %4
%25 = xor i32 %24, 1
store i32 %25, i32* %4
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
double __ocml_pow_f64(double, double);
double pow(double x, double y) { return __ocml_pow_f64(x, y); }


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__ocml_pow_f64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
jmp    1030 <__ocml_pow_f64@plt>

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ocml_pow_f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = tail call double @__ocml_pow_f64(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimir(int *p, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d\n", p[i]);
  }
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @imprimir(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef scalar_t__ __u32;

/* Variables and functions */
scalar_t__ INT_MAX;
int ethtool_validate_speed(__u32 speed) {
  return speed <= INT_MAX || speed == ((__u32)-1);
}


x86 assembly (clang, -O0):
<ethtool_validate_speed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
mov    0x2ed3(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x9(%rbp)
jle    112c <ethtool_validate_speed+0x2c>
cmpq   $0xffffffffffffffff,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ethtool_validate_speed>:
mov    0x2ee1(%rip),%rax
cmp    %rdi,(%rax)
setge  %al
cmp    $0xffffffffffffffff,%rdi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define i32 @ethtool_validate_speed(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @INT_MAX
%5 = icmp sle i64 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp eq i64 %7, -1
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define i32 @ethtool_validate_speed(i64 %0) {
%2 = load i64, i64* @INT_MAX
%3 = icmp sge i64 %2, %0
%4 = icmp eq i64 %0, -1
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int type(int);
int is_type(int cell, int t) { return type(cell) == t; }


x86 assembly (clang, -O0):
<is_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <type@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_type>:
push   %rbx
mov    %esi,%ebx
call   1030 <type@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_type(i32 %0, i32 %1) {
%3 = tail call i32 @type(i32 %0)
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _response(char const *);
void _stat_fail_501(void) {
  const char msg[] = "501 Syntax error in parameters or arguments.\r\n";
  _response(msg);
}


x86 assembly (clang, -O0):
<_stat_fail_501>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x2f,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1030 <_response@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat_fail_501>:
sub    $0x38,%rsp
movups 0xf04(%rip),%xmm0
movups %xmm0,0x1f(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <_response@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const._stat_fail_501.msg = [47 x i8] c"501 Syntax error in parameters or arguments.\0D\0A\00"
define void @_stat_fail_501() {
%1 = alloca [47 x i8]
%2 = bitcast [47 x i8]* %1 to i8*
%3 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 0
%4 = call i32 @_response(i8* %3)
ret void
}

LLVM IR (-O2):
@__const._stat_fail_501.msg = [47 x i8] c"501 Syntax error in parameters or arguments.\0D\0A\00"
define void @_stat_fail_501() {
%1 = alloca [47 x i8]
%2 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bitshow2();
bitshow() { bitshow2(); }


x86 assembly (clang, -O0):
<bitshow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bitshow2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bitshow() {
%1 = alloca i32
%2 = call i32 (...) @bitshow2()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @bitshow() {
%1 = tail call i32 (...) @bitshow2()
ret i32 undef
}