xunge/DecIR huggingface dataset:
int signal_safe_strlen(const char *str) {
  int i = 0;
  while (1) {
    if (str[i] == '\0')
      return i;
    i++;
  }
}


x86 assembly (clang, -O0):
<signal_safe_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1129 <signal_safe_strlen+0x29>
mov    -0xc(%rbp),%eax
pop    %rbp
ret
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <signal_safe_strlen+0xf>

x86 assembly (clang, -O2):
<signal_safe_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <signal_safe_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @signal_safe_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
bool print_b(bool b) {
  if (b) {
    printf("true\n");
  } else {
    printf("false\n");
  }
  return true;
}


x86 assembly (clang, -O0):
<print_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <print_b+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <print_b+0x32>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_b>:
push   %rax
test   %edi,%edi
lea    0xee6(%rip),%rax
lea    0xee5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"true\0A\00"
@.str.1 = [7 x i8] c"false\0A\00"
define i32 @print_b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 1
}

LLVM IR (-O2):
@str = [6 x i8] c"false\00"
@str.2 = [5 x i8] c"true\00"
define i32 @print_b(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 1
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ REG_UART_BASE(scalar_t__);
__attribute__((always_)) __attribute__((flatten)) uint32_t
UART_INT_CLR(uint32_t i) {
  return (REG_UART_BASE(i) + 0x10);
}


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

x86 assembly (clang, -O2):
<UART_INT_CLR>:
push   %rax
call   1030 <REG_UART_BASE@plt>
add    $0x10,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @UART_INT_CLR(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @REG_UART_BASE(i64 %3)
%5 = add nsw i64 %4, 16
ret i64 %5
}

LLVM IR (-O2):
define i64 @UART_INT_CLR(i64 %0) {
%2 = tail call i64 @REG_UART_BASE(i64 %0)
%3 = add nsw i64 %2, 16
ret i64 %3
}
int tank_len(float sample_rate, float size_seconds) {
  int n = sample_rate * size_seconds / 2 / 4 / 4;
  if (n < 32) {
    n = 32;
  }
  n *= 2 * 4 * 4;
  return n;
}


x86 assembly (clang, -O0):
<tank_len>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xee4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xed4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1154 <tank_len+0x54>
movl   $0x20,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tank_len>:
mulss  %xmm1,%xmm0
mulss  0xef4(%rip),%xmm0
movss  0xef0(%rip),%xmm1
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
cmp    $0x21,%ecx
mov    $0x20,%eax
cmovge %ecx,%eax
shl    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @tank_len(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = fdiv float %8, 2.000000e+00
%10 = fdiv float %9, 4.000000e+00
%11 = fdiv float %10, 4.000000e+00
%12 = fptosi float %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 32
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 32, i32* %5
br label %16
16: ; preds = %15, %2
%17 = load i32, i32* %5
%18 = mul nsw i32 %17, 32
store i32 %18, i32* %5
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @tank_len(float %0, float %1) {
%3 = fmul float %0, %1
%4 = fmul float %3, 5.000000e-01
%5 = fmul float %4, 2.500000e-01
%6 = fmul float %5, 2.500000e-01
%7 = fptosi float %6 to i32
%8 = icmp sgt i32 %7, 32
%9 = select i1 %8, i32 %7, i32 32
%10 = shl nsw i32 %9, 5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x71() {
  Assert_real((iscntrl(113) == 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_iscntrl.c",
              570, ("iscntrl should be 0 for q"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x71>:
push   %rax
mov    $0x71,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23a,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for q\00"
define void @t_iscntrl_0x71() {
%1 = call i64 @iscntrl(i32 113)
%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 570, i8* getelementptr inbounds ([26 x i8], [26 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for q\00"
define void @t_iscntrl_0x71() {
%1 = tail call i64 @iscntrl(i32 113)
%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 570, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct sembuf {
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ operation;

/* Variables and functions */
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void sem_wait(int semid) {
  struct sembuf operation[] = {
      {0, 0, 0},
  };
  semop(semid, operation, (sizeof(operation) / sizeof(struct sembuf)));
}


x86 assembly (clang, -O0):
<sem_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_wait>:
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
define void @sem_wait(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x %struct.sembuf]
store i32 %0, i32* %2
%4 = bitcast [1 x %struct.sembuf]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %3, i64 0, i64 0
%7 = call i32 @semop(i32 %5, %struct.sembuf* %6, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
define void @sem_wait(i32 %0) {
%2 = alloca [1 x %struct.sembuf]
%3 = bitcast [1 x %struct.sembuf]* %2 to i8*
%4 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %2, i64 0, i64 0
%5 = call i32 @semop(i32 %0, %struct.sembuf* %4, i32 1)
ret void
}
int cars_needed(int *space, int people) {
  int counter = 0;
  int index = 0;
  while (people > 0) {
    people -= space[index++];
    counter++;
  }
  return counter;
}


x86 assembly (clang, -O0):
<cars_needed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114e <cars_needed+0x4e>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <cars_needed+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cars_needed>:
xor    %eax,%eax
test   %esi,%esi
jle    111c <cars_needed+0x1c>
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%rcx
add    $0x1,%rax
sub    (%rdi,%rcx,4),%esi
jg     1110 <cars_needed+0x10>
ret

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

LLVM IR (-O2):
define i32 @cars_needed(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ 0, %2 ]
%6 = phi i32 [ %10, %4 ], [ %1, %2 ]
%7 = add nuw i64 %5, 1
%8 = getelementptr inbounds i32, i32* %0, i64 %5
%9 = load i32, i32* %8
%10 = sub nsw i32 %6, %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %4
%13 = trunc i64 %7 to i32
br label %14
14: ; preds = %12, %2
%15 = phi i32 [ 0, %2 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int omp_get_nested();
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int, int, int);
void work(int n) {
  printf("[%d of %d], nested = %d, n = %d\n", omp_get_thread_num(),
         omp_get_num_threads(), omp_get_nested(), n);
}


x86 assembly (clang, -O0):
<work>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <omp_get_nested@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
mov    -0x4(%rbp),%r8d
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<work>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <omp_get_nested@plt>
lea    0xe99(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %eax,%ecx
mov    %r14d,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"[%d of %d], nested = %d, n = %d\0A\00"
define void @work(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @omp_get_thread_num()
%4 = call i32 (...) @omp_get_num_threads()
%5 = call i32 (...) @omp_get_nested()
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"[%d of %d], nested = %d, n = %d\0A\00"
define void @work(i32 %0) {
%2 = tail call i32 (...) @omp_get_thread_num()
%3 = tail call i32 (...) @omp_get_num_threads()
%4 = tail call i32 (...) @omp_get_nested()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %0)
ret void
}
/* Type definitions */
struct i8x_object {
  int dummy;
};
struct i8x_list {
  int dummy;
};
struct i8x_ctx {
  int dummy;
};

/* Variables and functions */
struct i8x_ctx *i8x_ob_get_ctx(struct i8x_object *);
struct i8x_ctx *__attribute__((always_)) i8x_list_get_ctx(struct i8x_list *x) {
  return i8x_ob_get_ctx((struct i8x_object *)x);
}


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

x86 assembly (clang, -O2):
<i8x_list_get_ctx>:
jmp    1030 <i8x_ob_get_ctx@plt>

LLVM IR (-O0):
%struct.i8x_ctx = type { i32 }
%struct.i8x_list = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_ctx* @i8x_list_get_ctx(%struct.i8x_list* %0) {
%2 = alloca %struct.i8x_list*
store %struct.i8x_list* %0, %struct.i8x_list** %2
%3 = load %struct.i8x_list*, %struct.i8x_list** %2
%4 = bitcast %struct.i8x_list* %3 to %struct.i8x_object*
%5 = call %struct.i8x_ctx* @i8x_ob_get_ctx(%struct.i8x_object* %4)
ret %struct.i8x_ctx* %5
}

LLVM IR (-O2):
%struct.i8x_ctx = type { i32 }
%struct.i8x_list = type { i32 }
%struct.i8x_object = type { i32 }
define %struct.i8x_ctx* @i8x_list_get_ctx(%struct.i8x_list* %0) {
%2 = bitcast %struct.i8x_list* %0 to %struct.i8x_object*
%3 = tail call %struct.i8x_ctx* @i8x_ob_get_ctx(%struct.i8x_object* %2)
ret %struct.i8x_ctx* %3
}
/* Variables and functions */
scalar_t__ isWinningPositionOne(char **, char);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ readBoard(char **);
void TicTacToe(void) {
  char board[3][3];
  readBoard(board);
  printf("%c has won\n", (isWinningPositionOne(board, 'X')) ? 'X' : 'O');
}


x86 assembly (clang, -O0):
<TicTacToe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x9(%rbp),%rdi
call   1030 <readBoard@plt>
lea    -0x9(%rbp),%rdi
mov    $0x58,%esi
call   1050 <isWinningPositionOne@plt>
mov    %rax,%rdx
mov    $0x4f,%eax
mov    $0x58,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
lea    0xe96(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TicTacToe>:
push   %rbx
sub    $0x10,%rsp
lea    0x7(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <readBoard@plt>
mov    %rbx,%rdi
mov    $0x58,%esi
call   1050 <isWinningPositionOne@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rcx,%rcx,8),%esi
add    $0x4f,%esi
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%c has won\0A\00"
define void @TicTacToe() {
%1 = alloca [3 x [3 x i8]]
%2 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0
%3 = bitcast [3 x i8]* %2 to i8**
%4 = call i32 @readBoard(i8** %3)
%5 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0
%6 = bitcast [3 x i8]* %5 to i8**
%7 = call i64 @isWinningPositionOne(i8** %6, i8 signext 88)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 88, i32 79
%11 = trunc i32 %10 to i8
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%c has won\0A\00"
define void @TicTacToe() {
%1 = alloca [3 x [3 x i8]]
%2 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0, i64 0
%3 = bitcast [3 x [3 x i8]]* %1 to i8**
%4 = call i32 @readBoard(i8** %3)
%5 = call i64 @isWinningPositionOne(i8** %3, i8 signext 88)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8 79, i8 88
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %7)
ret void
}
int test_imm_BBint16_mem(short *val) {
  return ((*val) & (0xBB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BBint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xbb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_BBint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 187
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int mat3_cmpV(double **, double **, int);
int mat3_cmp(double A[3][3], double B[3][3]) { return mat3_cmpV(A, B, 1e-10); }


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

x86 assembly (clang, -O2):
<mat3_cmp>:
xor    %edx,%edx
jmp    1030 <mat3_cmpV@plt>

LLVM IR (-O0):
define i32 @mat3_cmp([3 x double]* %0, [3 x double]* %1) {
%3 = alloca [3 x double]*
%4 = alloca [3 x double]*
store [3 x double]* %0, [3 x double]** %3
store [3 x double]* %1, [3 x double]** %4
%5 = load [3 x double]*, [3 x double]** %3
%6 = bitcast [3 x double]* %5 to double**
%7 = load [3 x double]*, [3 x double]** %4
%8 = bitcast [3 x double]* %7 to double**
%9 = call i32 @mat3_cmpV(double** %6, double** %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
define i32 @mat3_cmp([3 x double]* %0, [3 x double]* %1) {
%3 = bitcast [3 x double]* %0 to double**
%4 = bitcast [3 x double]* %1 to double**
%5 = tail call i32 @mat3_cmpV(double** %3, double** %4, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void ctest_diagnostic(const char *line) { printf("# %s\n", line); }


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

x86 assembly (clang, -O2):
<ctest_diagnostic>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"# %s\0A\00"
define void @ctest_diagnostic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void transdata_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @transdata_flush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sp(void) { printf(" "); }


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

x86 assembly (clang, -O2):
<sp>:
mov    $0x20,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @sp() {
%1 = tail call i32 @putchar(i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
int /*<<< orphan*/ exit(int);
scalar_t__ ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
void i2c_acquire_bus(int fd, int addr) {
  if (ioctl(fd, I2C_SLAVE, addr) < 0) {
    perror("Failed to acquire bus access and/or talk to slave.\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<i2c_acquire_bus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1172 <i2c_acquire_bus+0x42>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_acquire_bus>:
push   %rax
mov    %esi,%edx
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
js     1148 <i2c_acquire_bus+0x18>
pop    %rax
ret
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@I2C_SLAVE = global i32 0
@.str = [52 x i8] c"Failed to acquire bus access and/or talk to slave.\0A\00"
define void @i2c_acquire_bus(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* @I2C_SLAVE
%7 = load i32, i32* %4
%8 = call i64 @ioctl(i32 %5, i32 %6, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@I2C_SLAVE = global i32 0
@.str = [52 x i8] c"Failed to acquire bus access and/or talk to slave.\0A\00"
define void @i2c_acquire_bus(i32 %0, i32 %1) {
%3 = load i32, i32* @I2C_SLAVE
%4 = tail call i64 @ioctl(i32 %0, i32 %3, i32 %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *acc_create(unsigned char *, int const);
int /*<<< orphan*/ acc_delete(unsigned char *, int const);
int /*<<< orphan*/ free(unsigned char *);
scalar_t__ malloc(int const);
int main(int argc, char **argv) {
  const int N = 256;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_create(h, N);
  if (!d)
    abort();
  acc_delete(h, N - 2);
  free(h);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x100,-0x14(%rbp)
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100,%esi
call   1050 <acc_create@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    119f <main+0x4f>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x20(%rbp),%rdi
mov    $0xfe,%esi
call   1070 <acc_delete@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x100,%esi
call   1050 <acc_create@plt>
test   %rax,%rax
je     1189 <main+0x39>
mov    %rbx,%rdi
mov    $0xfe,%esi
call   1070 <acc_delete@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 256, i32* %6
%9 = call i64 @malloc(i32 256)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = call i8* @acc_create(i8* %11, i32 256)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = icmp ne i8* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %2
%18 = load i8*, i8** %7
%19 = call i32 @acc_delete(i8* %18, i32 254)
%20 = load i8*, i8** %7
%21 = call i32 @free(i8* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 256)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @acc_create(i8* %4, i32 256)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = tail call i32 @acc_delete(i8* %4, i32 254)
%11 = tail call i32 @free(i8* %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ calloc(int /*<<< orphan*/, int);
int32_t halloc(int32_t size) { return (int32_t)calloc(size, 1); }


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

x86 assembly (clang, -O2):
<halloc>:
mov    $0x1,%esi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define i32 @halloc(i32 %0) {
%2 = tail call i32 @calloc(i32 %0, i32 1)
ret i32 %2
}
unsigned int MAKE_VERSION(unsigned int p, unsigned int q, unsigned int r) {
  return (65536 * p) + (256 * q) + r;
}


x86 assembly (clang, -O0):
<MAKE_VERSION>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAKE_VERSION>:
shl    $0x10,%edi
shl    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @MAKE_VERSION(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = mul i32 65536, %7
%9 = load i32, i32* %5
%10 = mul i32 256, %9
%11 = add i32 %8, %10
%12 = load i32, i32* %6
%13 = add i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @MAKE_VERSION(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 16
%5 = shl i32 %1, 8
%6 = add i32 %5, %4
%7 = add i32 %6, %2
ret i32 %7
}
void gtk_tool_item_set_visible_vertical() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tool_item_set_visible_vertical() {
ret void
}
int test_imm_37uint8_mem(unsigned char *val) {
  return ((*val) & (0x37 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_37uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x37,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_37uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 55
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sz;

/* Variables and functions */
int /*<<< orphan*/ write_all(int, void const *, size_t);
void write_blob(int fd, const void *data, size_t sz) {
  write_all(fd, &sz, sizeof(sz));
  write_all(fd, data, sz);
}


x86 assembly (clang, -O0):
<write_blob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <write_all@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write_all@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_blob>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rdx,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <write_all@plt>
mov    (%rsp),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <write_all@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @write_blob(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = bitcast i64* %6 to i8*
%9 = call i32 @write_all(i32 %7, i8* %8, i64 8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @write_all(i32 %10, i8* %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @write_blob(i32 %0, i8* %1, i64 %2) {
%4 = alloca i64
store i64 %2, i64* %4
%5 = bitcast i64* %4 to i8*
%6 = call i32 @write_all(i32 %0, i8* %5, i64 8)
%7 = load i64, i64* %4
%8 = call i32 @write_all(i32 %0, i8* %1, i64 %7)
ret void
}
void func(void) { ; }


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

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

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

LLVM IR (-O2):
define void @func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, float *);
int main() {
  int en, wh;
  float ws;
  scanf("%i %i %f", &en, &wh, &ws);
  printf("NUMBER = %i\n", en);
  printf("SALARY = U$ %.2f\n", wh * ws);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl 0x10(%rsp),%xmm0
mulss  0xc(%rsp),%xmm0
cvttss2si %xmm0,%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%i %i %f\00"
@.str.1 = [13 x i8] c"NUMBER = %i\0A\00"
@.str.2 = [18 x i8] c"SALARY = U$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, float* %4)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
%10 = load float, float* %4
%11 = fmul float %9, %10
%12 = fptosi float %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%i %i %f\00"
@.str.1 = [13 x i8] c"NUMBER = %i\0A\00"
@.str.2 = [18 x i8] c"SALARY = U$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, float* %3)
%8 = load i32, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to float
%12 = load float, float* %3
%13 = fmul float %12, %11
%14 = fptosi float %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Type definitions */
struct tfshdr {
  int dummy;
};

/* Variables and functions */
int _tfsfstat(char *, struct tfshdr *);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_tfsfstat(char *name, struct tfshdr *fp) {
  int ret;
  monLock();
  ret = _tfsfstat(name, fp);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_tfsfstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <_tfsfstat@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_tfsfstat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <_tfsfstat@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tfshdr = type { i32 }
define i32 @mon_tfsfstat(i8* %0, %struct.tfshdr* %1) {
%3 = alloca i8*
%4 = alloca %struct.tfshdr*
%5 = alloca i32
store i8* %0, i8** %3
store %struct.tfshdr* %1, %struct.tfshdr** %4
%6 = call i32 (...) @monLock()
%7 = load i8*, i8** %3
%8 = load %struct.tfshdr*, %struct.tfshdr** %4
%9 = call i32 @_tfsfstat(i8* %7, %struct.tfshdr* %8)
store i32 %9, i32* %5
%10 = call i32 (...) @monUnlock()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
%struct.tfshdr = type { i32 }
define i32 @mon_tfsfstat(i8* %0, %struct.tfshdr* %1) {
%3 = tail call i32 (...) @monLock()
%4 = tail call i32 @_tfsfstat(i8* %0, %struct.tfshdr* %1)
%5 = tail call i32 (...) @monUnlock()
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_SYMLINK_NOFOLLOW;
int INLINE_SYSCALL(int /*<<< orphan*/, int, int /*<<< orphan*/, char const *,
                   int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fchownat;
int __lchown(const char *file, uid_t owner, gid_t group) {
  return INLINE_SYSCALL(fchownat, 5, AT_FDCWD, file, owner, group,
                        AT_SYMLINK_NOFOLLOW);
}


x86 assembly (clang, -O0):
<__lchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    0x2e96(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    $0x5,%esi
mov    %eax,(%rsp)
call   1030 <INLINE_SYSCALL@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__lchown>:
push   %rax
mov    %edx,%r9d
mov    %esi,%r8d
mov    %rdi,%rcx
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    $0x5,%esi
call   1030 <INLINE_SYSCALL@plt>
pop    %rcx
ret

LLVM IR (-O0):
@fchownat = global i32 0
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @__lchown(i8* %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 i32, i32* @fchownat
%8 = load i32, i32* @AT_FDCWD
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%13 = call i32 @INLINE_SYSCALL(i32 %7, i32 5, i32 %8, i8* %9, i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@fchownat = global i32 0
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @__lchown(i8* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @fchownat
%5 = load i32, i32* @AT_FDCWD
%6 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%7 = tail call i32 @INLINE_SYSCALL(i32 %4, i32 5, i32 %5, i8* %0, i32 %1, i32 %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test1(unsigned int u1) {
  unsigned int y_final_1;
  signed short y_middle;
  unsigned int y_final_2;
  y_final_1 = (unsigned int)((signed short)(u1 * 2) * 3);
  y_middle = (signed short)(u1 * 2);
  y_final_2 = (unsigned int)(y_middle * 3);
  if (y_final_1 != y_final_2)
    abort();
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cwtl
imul   $0x3,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     114f <test1+0x3f>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = mul i32 %6, 2
%8 = trunc i32 %7 to i16
%9 = sext i16 %8 to i32
%10 = mul nsw i32 %9, 3
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = mul i32 %11, 2
%13 = trunc i32 %12 to i16
store i16 %13, i16* %4
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
%16 = mul nsw i32 %15, 3
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = load i32, i32* %5
%19 = icmp ne i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %1
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0) {
ret void
}
/* Variables and functions */
unsigned int gf32_matrix_times(unsigned int *, unsigned int);
void gf32_matrix_square(unsigned *square, unsigned *matrix) {
  int n = 0;
  do {
    square[n] = gf32_matrix_times(matrix, matrix[n]);
  } while (++n < 32);
}


x86 assembly (clang, -O0):
<gf32_matrix_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <gf32_matrix_times@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x20,%eax
jl     1127 <gf32_matrix_square+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf32_matrix_square>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,4),%esi
mov    %r15,%rdi
call   1030 <gf32_matrix_times@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1120 <gf32_matrix_square+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @gf32_matrix_square(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 = %18, %2
%7 = load i32*, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = call i32 @gf32_matrix_times(i32* %7, i32 %12)
%14 = load i32*, i32** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %13, i32* %17
br label %18
18: ; preds = %6
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
%21 = icmp slt i32 %20, 32
br i1 %21, label %6, label %22
22: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @gf32_matrix_square(i32* nocapture writeonly %0, i32* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 @gf32_matrix_times(i32* %1, i32 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %7, i32* %8
%9 = add nuw nsw i64 %4, 1
%10 = icmp eq i64 %9, 32
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
scalar_t__ clock();
void sleep(clock_t wait) {
  clock_t goal;
  goal = wait + clock();
  while (goal - clock() > 0)
    ;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
cmp    $0x0,%rax
jle    1161 <sleep+0x51>
jmp    1139 <sleep+0x29>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
add    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <clock@plt>
cmp    %rax,%rbx
jg     1130 <sleep+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sleep(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 (...) @clock()
%6 = add nsw i64 %4, %5
store i64 %6, i64* %3
br label %7
7: ; preds = %12, %1
%8 = load i64, i64* %3
%9 = call i64 (...) @clock()
%10 = sub nsw i64 %8, %9
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @sleep(i64 %0) {
%2 = tail call i64 (...) @clock()
%3 = add nsw i64 %2, %0
br label %4
4: ; preds = %4, %1
%5 = tail call i64 (...) @clock()
%6 = icmp sgt i64 %3, %5
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
void initialize_char_vector(char *vector, int size) {
  int i;
  for (i = 0; i < size; i++) {
    vector[i] = 0;
  }
}


x86 assembly (clang, -O0):
<initialize_char_vector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <initialize_char_vector+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <initialize_char_vector+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_char_vector>:
test   %esi,%esi
jle    1122 <initialize_char_vector+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @initialize_char_vector(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
int xmlUCSIsAlphabeticPresentationForms(int code) {
  return (((code >= 0xFB00) && (code <= 0xFB4F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsAlphabeticPresentationForms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xfb00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsAlphabeticPresentationForms+0x26>
cmpl   $0xfb4f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsAlphabeticPresentationForms>:
add    $0xffff0500,%edi
xor    %eax,%eax
cmp    $0x50,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsAlphabeticPresentationForms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 64256
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 64335
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsAlphabeticPresentationForms(i32 %0) {
%2 = add i32 %0, -64256
%3 = icmp ult i32 %2, 80
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strstr(char *, char *);
void uninivar_strstr(void) {
  char *cs;
  char *ct;
  (void)strstr(cs, ct);
}


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

x86 assembly (clang, -O2):
<uninivar_strstr>:
jmp    1030 <strstr@plt>

LLVM IR (-O0):
define void @uninivar_strstr() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strstr(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_strstr() {
%1 = tail call i32 @strstr(i8* undef, i8* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ system(char *);
char *wPopString();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasShell() {
  char *string;
  string = wPopString();
  system(string);
  free(string);
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasShell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wPopString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <system@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasShell>:
push   %rbx
xor    %eax,%eax
call   1040 <wPopString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <system@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %edi,%edi
pop    %rbx
jmp    1060 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasShell() {
%1 = alloca i8*
%2 = call i8* (...) @wPopString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @system(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
%7 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasShell() {
%1 = tail call i8* (...) @wPopString()
%2 = tail call i32 @system(i8* %1)
%3 = tail call i32 @free(i8* %1)
%4 = tail call i32 @wPushNumber(i32 0)
ret void
}