xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x83() {
  Assert_real((iscntrl(131) == 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",
              660, ("iscntrl should be 0 for 0x83"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x83>:
push   %rax
mov    $0x83,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x294,%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 = [29 x i8] c"iscntrl should be 0 for 0x83\00"
define void @t_iscntrl_0x83() {
%1 = call i64 @iscntrl(i32 131)
%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 660, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x83\00"
define void @t_iscntrl_0x83() {
%1 = tail call i64 @iscntrl(i32 131)
%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 660, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dmmddact_(int *, int *, double *, double *, int *, double *,
                             double *, int *);
void wcc_dmmddact_(int *M, int *N, char *ALPHA, char *A, int *LDA, char *BETA,
                   char *B, int *LDB) {
  dmmddact_(M, N, (double *)ALPHA, (double *)A, LDA, (double *)BETA,
            (double *)B, LDB);
}


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

x86 assembly (clang, -O2):
<wcc_dmmddact_>:
jmp    1030 <dmmddact_@plt>

LLVM IR (-O0):
define void @wcc_dmmddact_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32*
store i32* %0, i32** %9
store i32* %1, i32** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %9
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i8*, i8** %12
%22 = bitcast i8* %21 to double*
%23 = load i32*, i32** %13
%24 = load i8*, i8** %14
%25 = bitcast i8* %24 to double*
%26 = load i8*, i8** %15
%27 = bitcast i8* %26 to double*
%28 = load i32*, i32** %16
%29 = call i32 @dmmddact_(i32* %17, i32* %18, double* %20, double* %22, i32* %23, double* %25, double* %27, i32* %28)
ret void
}

LLVM IR (-O2):
define void @wcc_dmmddact_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = bitcast i8* %2 to double*
%10 = bitcast i8* %3 to double*
%11 = bitcast i8* %5 to double*
%12 = bitcast i8* %6 to double*
%13 = tail call i32 @dmmddact_(i32* %0, i32* %1, double* %9, double* %10, i32* %4, double* %11, double* %12, i32* %7)
ret void
}
void gtk_paint_extension() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_extension() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int width;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigure_width(void *_p, int _v) {
  ((XEvent *)_p)->xconfigure.width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigure_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigure_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigure_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int isprint(int c) { return ((c) >= ' ') && ((c) <= 126); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isprint+0x20>
cmpl   $0x7e,-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):
<isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
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 @isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_table_header(char *table) {
  printf("--\n");
  printf("-- Table structure for table `%s`\n", table);
  printf("--\n");
}


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

x86 assembly (clang, -O2):
<print_table_header>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xef5(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"--\0A\00"
@.str.1 = [35 x i8] c"-- Table structure for table `%s`\0A\00"
define void @print_table_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [35 x i8] c"-- Table structure for table `%s`\0A\00"
@str.2 = [3 x i8] c"--\00"
define void @print_table_header(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
char *inet_ntoa_r(struct in_addr, char *);
char *inet_ntoa(struct in_addr ina) {
  static char buf[sizeof "123.456.789.012"];
  return inet_ntoa_r(ina, buf);
}


x86 assembly (clang, -O0):
<inet_ntoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0x2f1b(%rip),%rsi
call   1030 <inet_ntoa_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_ntoa>:
lea    0x2f29(%rip),%rsi
jmp    1030 <inet_ntoa_r@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@inet_ntoa.buf = internal global [16 x i8] zeroinitializer
define i8* @inet_ntoa(i32 %0) {
%2 = alloca %struct.in_addr
%3 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i8* @inet_ntoa_r(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @inet_ntoa.buf, i64 0, i64 0))
ret i8* %6
}

LLVM IR (-O2):
@inet_ntoa.buf = internal global [16 x i8] zeroinitializer
define i8* @inet_ntoa(i32 %0) {
%2 = tail call i8* @inet_ntoa_r(i32 %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @inet_ntoa.buf, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void foo() {
  int A[30], *p;
#pragma omp target data map(A [0:10])
  {
    p = &A[0];
#pragma omp target map(p [3:7]) map(A [0:10])
    {
      A[2] = 777;
      A[8] = 777;
      p[8] = 999;
    }
  }
  if (A[2] != 777 || A[8] != 999)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
movl   $0x309,-0x78(%rbp)
movl   $0x309,-0x60(%rbp)
mov    -0x88(%rbp),%rax
movl   $0x3e7,0x20(%rax)
cmpl   $0x309,-0x78(%rbp)
jne    115c <foo+0x4c>
cmpl   $0x3e7,-0x60(%rbp)
je     1163 <foo+0x53>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x90,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca [30 x i32]
%2 = alloca i32*
%3 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
store i32* %3, i32** %2
%4 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 2
store i32 777, i32* %4
%5 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 8
store i32 777, i32* %5
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 8
store i32 999, i32* %7
%8 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 2
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 777
br i1 %10, label %15, label %11
11: ; preds = %0
%12 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 8
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 999
br i1 %14, label %15, label %17
15: ; preds = %11, %0
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int SIGINT;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void exit_SIGINT(int sig_num) {
  if (sig_num == SIGINT) {
    fprintf(stdout, "\n /!\\ SATOMI INTERRUPTED /!\\ \n");
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<exit_SIGINT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1152 <exit_SIGINT+0x32>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_SIGINT>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    1141 <exit_SIGINT+0x21>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@stdout = global i32 0
@.str = [31 x i8] c"\0A /!\\ SATOMI INTERRUPTED /!\\ \0A\00"
@EXIT_SUCCESS = global i32 0
define void @exit_SIGINT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* @EXIT_SUCCESS
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@stdout = global i32 0
@.str = [31 x i8] c"\0A /!\\ SATOMI INTERRUPTED /!\\ \0A\00"
@EXIT_SUCCESS = global i32 0
define void @exit_SIGINT(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %1
%8 = load i32, i32* @EXIT_SUCCESS
%9 = tail call i32 @exit(i32 %8)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ SCB_2_I2CInit();
void SCB_2_Init(void) { SCB_2_I2CInit(); }


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

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

LLVM IR (-O0):
define void @SCB_2_Init() {
%1 = call i32 (...) @SCB_2_I2CInit()
ret void
}

LLVM IR (-O2):
define void @SCB_2_Init() {
%1 = tail call i32 (...) @SCB_2_I2CInit()
ret void
}
int int_cmp(const int *l, const int *r) {
  if (*l < *r)
    return -1;
  if (*l > *r)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<int_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <int_cmp+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <int_cmp+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1148 <int_cmp+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <int_cmp+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_cmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @int_cmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = icmp sgt i32 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
char *strchr(const char *p, int ch) {
  for (;; ++p) {
    if (*p == ch)
      return ((char *)p);
    if (!*p)
      return ((char *)NULL);
  }
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1128 <strchr+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <strchr+0x58>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1142 <strchr+0x42>
movq   $0x0,-0x8(%rbp)
jmp    1158 <strchr+0x58>
jmp    1147 <strchr+0x47>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <strchr+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
movsbl (%rdi),%ecx
cmp    %esi,%ecx
je     1120 <strchr+0x20>
nopw   0x0(%rax,%rax,1)
test   %cl,%cl
je     1121 <strchr+0x21>
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    %esi,%ecx
jne    1110 <strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, %1
br i1 %5, label %15, label %6
6: ; preds = %2, %10
%7 = phi i8 [ %12, %10 ], [ %3, %2 ]
%8 = phi i8* [ %11, %10 ], [ %0, %2 ]
%9 = icmp eq i8 %7, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, %1
br i1 %14, label %15, label %6
15: ; preds = %10, %6, %2
%16 = phi i8* [ %0, %2 ], [ null, %6 ], [ %11, %10 ]
ret i8* %16
}
void SleepMode_Refresh(void) {}


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

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

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

LLVM IR (-O2):
define void @SleepMode_Refresh() {
ret void
}
/* Type definitions */
struct html {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufcat_fmt(struct html *, char *, int /*<<< orphan*/);
void bufcat_id(struct html *h, const char *src) {
  while ('\0' != *src)
    bufcat_fmt(h, "%.2x", *src++);
}


x86 assembly (clang, -O0):
<bufcat_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1158 <bufcat_id+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edx
lea    0xeb2(%rip),%rsi
call   1030 <bufcat_fmt@plt>
jmp    1120 <bufcat_id+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufcat_id>:
push   %r15
push   %r14
push   %rbx
mov    (%rsi),%al
test   %al,%al
je     1149 <bufcat_id+0x39>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movsbl %al,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <bufcat_fmt@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <bufcat_id+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.html = type { i32 }
@.str = [5 x i8] c"%.2x\00"
define void @bufcat_id(%struct.html* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @bufcat_fmt(%struct.html* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int isprime(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", isprime(9));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @isprime(i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct v4l2_capability {
  int capabilities;
  int device_caps;
};
typedef int __u32;

/* Variables and functions */
int V4L2_CAP_DEVICE_CAPS;
__u32 v4l_capability_g_caps(const struct v4l2_capability *cap) {
  return (cap->capabilities & V4L2_CAP_DEVICE_CAPS) ? cap->device_caps
                                                    : cap->capabilities;
}


x86 assembly (clang, -O0):
<v4l_capability_g_caps>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ed3(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     112f <v4l_capability_g_caps+0x2f>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <v4l_capability_g_caps+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l_capability_g_caps>:
mov    (%rdi),%eax
mov    0x2edf(%rip),%rcx
test   %eax,(%rcx)
je     1110 <v4l_capability_g_caps+0x10>
mov    0x4(%rdi),%eax
ret

LLVM IR (-O0):
%struct.v4l2_capability = type { i32, i32 }
@V4L2_CAP_DEVICE_CAPS = global i32 0
define i32 @v4l_capability_g_caps(%struct.v4l2_capability* %0) {
%2 = alloca %struct.v4l2_capability*
store %struct.v4l2_capability* %0, %struct.v4l2_capability** %2
%3 = load %struct.v4l2_capability*, %struct.v4l2_capability** %2
%4 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @V4L2_CAP_DEVICE_CAPS
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load %struct.v4l2_capability*, %struct.v4l2_capability** %2
%11 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %10, i32 0, i32 1
%12 = load i32, i32* %11
br label %17
13: ; preds = %1
%14 = load %struct.v4l2_capability*, %struct.v4l2_capability** %2
%15 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %14, i32 0, i32 0
%16 = load i32, i32* %15
br label %17
17: ; preds = %13, %9
%18 = phi i32 [ %12, %9 ], [ %16, %13 ]
ret i32 %18
}

LLVM IR (-O2):
%struct.v4l2_capability = type { i32, i32 }
@V4L2_CAP_DEVICE_CAPS = global i32 0
define i32 @v4l_capability_g_caps(%struct.v4l2_capability* nocapture %0) {
%2 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @V4L2_CAP_DEVICE_CAPS
%5 = and i32 %4, %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.v4l2_capability, %struct.v4l2_capability* %0, i64 0, i32 1
%9 = load i32, i32* %8
br label %10
10: ; preds = %1, %7
%11 = phi i32 [ %9, %7 ], [ %3, %1 ]
ret i32 %11
}
/* Variables and functions */
void *malloc(size_t);
void *zmalloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<zmalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @zmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void gtk_label_get_use_underline() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_get_use_underline() {
ret void
}
/* Variables and functions */
int syscall(int);
int mysyscall() {
  int i;
  i = syscall(300);
  return i;
}


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

x86 assembly (clang, -O2):
<mysyscall>:
mov    $0x12c,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @mysyscall() {
%1 = alloca i32
%2 = call i32 @syscall(i32 300)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @mysyscall() {
%1 = tail call i32 @syscall(i32 300)
ret i32 %1
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int unlink(char const *const);
int our_unlink(const char *const path) {
  do {
    const int ret = unlink(path);
    if (ret == 0) {
      return ret;
    }
  } while (errno == EINTR);
  return -1;
}


x86 assembly (clang, -O0):
<our_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    113d <our_unlink+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <our_unlink+0x53>
jmp    1142 <our_unlink+0x32>
mov    0x2e97(%rip),%rax
mov    (%rax),%rax
mov    0x2e85(%rip),%rcx
cmp    (%rcx),%rax
je     111c <our_unlink+0xc>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<our_unlink>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ec1(%rip),%r14
mov    0x2eb2(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <unlink@plt>
test   %eax,%eax
je     114b <our_unlink+0x3b>
mov    (%r14),%rax
cmp    (%r15),%rax
je     1130 <our_unlink+0x20>
mov    $0xffffffff,%eax
jmp    114d <our_unlink+0x3d>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @our_unlink(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
br label %5
5: ; preds = %13, %1
%6 = load i8*, i8** %3
%7 = call i32 @unlink(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %18
12: ; preds = %5
br label %13
13: ; preds = %12
%14 = load i64, i64* @errno
%15 = load i64, i64* @EINTR
%16 = icmp eq i64 %14, %15
br i1 %16, label %5, label %17
17: ; preds = %13
store i32 -1, i32* %2
br label %18
18: ; preds = %17, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @our_unlink(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i32 @unlink(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
br i1 %8, label %2, label %9
9: ; preds = %2, %5
%10 = phi i32 [ 0, %2 ], [ -1, %5 ]
ret i32 %10
}
/* Type definitions */
struct _tuple1 {
  int dummy;
};
struct Cyc_Sexp_Parser {
  int dummy;
};

/* Variables and functions */
struct _tuple1 *Cyc_Sexp_mk_schar(char);
unsigned char Cyc_Sexp_parse_char(struct Cyc_Sexp_Parser *);
struct _tuple1 *Cyc_Sexp_parse_schar(struct Cyc_Sexp_Parser *p) {
  unsigned char _T0;
  signed char _T1;
  struct _tuple1 *_T2;
  _T0 = Cyc_Sexp_parse_char(p);
  _T1 = (signed char)_T0;
  _T2 = Cyc_Sexp_mk_schar(_T1);
  return _T2;
}


x86 assembly (clang, -O0):
<Cyc_Sexp_parse_schar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Cyc_Sexp_parse_char@plt>
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%edi
call   1040 <Cyc_Sexp_mk_schar@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Sexp_parse_schar>:
push   %rax
call   1030 <Cyc_Sexp_parse_char@plt>
movsbl %al,%edi
pop    %rax
jmp    1040 <Cyc_Sexp_mk_schar@plt>

LLVM IR (-O0):
%struct._tuple1 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple1* @Cyc_Sexp_parse_schar(%struct.Cyc_Sexp_Parser* %0) {
%2 = alloca %struct.Cyc_Sexp_Parser*
%3 = alloca i8
%4 = alloca i8
%5 = alloca %struct._tuple1*
store %struct.Cyc_Sexp_Parser* %0, %struct.Cyc_Sexp_Parser** %2
%6 = load %struct.Cyc_Sexp_Parser*, %struct.Cyc_Sexp_Parser** %2
%7 = call zeroext i8 @Cyc_Sexp_parse_char(%struct.Cyc_Sexp_Parser* %6)
store i8 %7, i8* %3
%8 = load i8, i8* %3
store i8 %8, i8* %4
%9 = load i8, i8* %4
%10 = call %struct._tuple1* @Cyc_Sexp_mk_schar(i8 signext %9)
store %struct._tuple1* %10, %struct._tuple1** %5
%11 = load %struct._tuple1*, %struct._tuple1** %5
ret %struct._tuple1* %11
}

LLVM IR (-O2):
%struct._tuple1 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple1* @Cyc_Sexp_parse_schar(%struct.Cyc_Sexp_Parser* %0) {
%2 = tail call zeroext i8 @Cyc_Sexp_parse_char(%struct.Cyc_Sexp_Parser* %0)
%3 = tail call %struct._tuple1* @Cyc_Sexp_mk_schar(i8 signext %2)
ret %struct._tuple1* %3
}
int cmp1Desc(const void *pa, const void *pb) {
  const short *a = (const short *)pa;
  const short *b = (const short *)pb;
  if (a[1] < b[1])
    return +1;
  if (a[1] > b[1])
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp1Desc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movswl 0x2(%rax),%eax
mov    -0x28(%rbp),%rcx
movswl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jge    1140 <cmp1Desc+0x40>
movl   $0x1,-0x4(%rbp)
jmp    116b <cmp1Desc+0x6b>
mov    -0x20(%rbp),%rax
movswl 0x2(%rax),%eax
mov    -0x28(%rbp),%rcx
movswl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jle    1164 <cmp1Desc+0x64>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <cmp1Desc+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp1Desc>:
movzwl 0x2(%rdi),%eax
movzwl 0x2(%rsi),%ecx
xor    %edx,%edx
cmp    %cx,%ax
setg   %dl
neg    %edx
cmp    %cx,%ax
mov    $0x1,%eax
cmovge %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmp1Desc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i16*
%7 = alloca i16*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i16*
store i16* %9, i16** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i16*
store i16* %11, i16** %7
%12 = load i16*, i16** %6
%13 = getelementptr inbounds i16, i16* %12, i64 1
%14 = load i16, i16* %13
%15 = sext i16 %14 to i32
%16 = load i16*, i16** %7
%17 = getelementptr inbounds i16, i16* %16, i64 1
%18 = load i16, i16* %17
%19 = sext i16 %18 to i32
%20 = icmp slt i32 %15, %19
br i1 %20, label %21, label %22
21: ; preds = %2
store i32 1, i32* %3
br label %34
22: ; preds = %2
%23 = load i16*, i16** %6
%24 = getelementptr inbounds i16, i16* %23, i64 1
%25 = load i16, i16* %24
%26 = sext i16 %25 to i32
%27 = load i16*, i16** %7
%28 = getelementptr inbounds i16, i16* %27, i64 1
%29 = load i16, i16* %28
%30 = sext i16 %29 to i32
%31 = icmp sgt i32 %26, %30
br i1 %31, label %32, label %33
32: ; preds = %22
store i32 -1, i32* %3
br label %34
33: ; preds = %22
store i32 0, i32* %3
br label %34
34: ; preds = %33, %32, %21
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @cmp1Desc(i8* nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = bitcast i8* %3 to i16*
%5 = load i16, i16* %4
%6 = getelementptr inbounds i8, i8* %1, i64 2
%7 = bitcast i8* %6 to i16*
%8 = load i16, i16* %7
%9 = icmp slt i16 %5, %8
%10 = icmp sgt i16 %5, %8
%11 = sext i1 %10 to i32
%12 = select i1 %9, i32 1, i32 %11
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printArr(int *, int);
int /*<<< orphan*/ swappos(int *, int /*<<< orphan*/, int);
int main(void) {
  int arr[] = {2, 3, 6, 1, 4, 7, 8, 9, 5, 0};
  printArr(arr, sizeof(arr) / sizeof(int));
  swappos(arr, 0, sizeof(arr) / sizeof(int) - 1);
  printArr(arr, sizeof(arr) / sizeof(int));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <printArr@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1050 <swappos@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <printArr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printArr@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <swappos@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printArr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 2, i32 3, i32 6, i32 1, i32 4, i32 7, i32 8, i32 9, i32 5, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @printArr(i32* %4, i32 10)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @swappos(i32* %6, i32 0, i32 9)
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = call i32 @printArr(i32* %8, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 2, i32 3, i32 6, i32 1, i32 4, i32 7, i32 8, i32 9, i32 5, i32 0]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @printArr(i32* %3, i32 10)
%5 = call i32 @swappos(i32* %3, i32 0, i32 9)
%6 = call i32 @printArr(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_env();
int /*<<< orphan*/ init_env();
int /*<<< orphan*/ parse_opt(int, char **);
int sandbox();
int main(int argc, char *argv[]) {
  int ret;
  parse_opt(argc, argv);
  init_env();
  ret = sandbox();
  clear_env();
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parse_opt@plt>
mov    $0x0,%al
call   1040 <init_env@plt>
mov    $0x0,%al
call   1060 <sandbox@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <clear_env@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1030 <parse_opt@plt>
xor    %eax,%eax
call   1040 <init_env@plt>
xor    %eax,%eax
call   1060 <sandbox@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <clear_env@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @parse_opt(i32 %7, i8** %8)
%10 = call i32 (...) @init_env()
%11 = call i32 (...) @sandbox()
store i32 %11, i32* %6
%12 = call i32 (...) @clear_env()
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_opt(i32 %0, i8** %1)
%4 = tail call i32 (...) @init_env()
%5 = tail call i32 (...) @sandbox()
%6 = tail call i32 (...) @clear_env()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gemm(double *, double *, double *);
void workload(double m1[64 * 64], double m2[64 * 64], double prod[64 * 64]) {
#pragma HLS INTERFACE m_axi port = m1 offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = m2 offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = prod offset = slave bundle = gmem
#pragma HLS INTERFACE s_axilite port = m1 bundle = control
#pragma HLS INTERFACE s_axilite port = m2 bundle = control
#pragma HLS INTERFACE s_axilite port = prod bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  gemm(m1, m2, prod);
  return;
}


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

x86 assembly (clang, -O2):
<workload>:
jmp    1030 <gemm@plt>

LLVM IR (-O0):
define void @workload(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load double*, double** %6
%10 = call i32 @gemm(double* %7, double* %8, double* %9)
ret void
}

LLVM IR (-O2):
define void @workload(double* %0, double* %1, double* %2) {
%4 = tail call i32 @gemm(double* %0, double* %1, double* %2)
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *somePath(struct sqlConnection *, int, char *);
char *visiGeneThumbSizePath(struct sqlConnection *conn, int id) {
  return somePath(conn, id, "thumbLocation");
}


x86 assembly (clang, -O0):
<visiGeneThumbSizePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <somePath@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneThumbSizePath>:
lea    0xee9(%rip),%rdx
jmp    1030 <somePath@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [14 x i8] c"thumbLocation\00"
define i8* @visiGeneThumbSizePath(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @somePath(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [14 x i8] c"thumbLocation\00"
define i8* @visiGeneThumbSizePath(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @somePath(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hlist_unhashed(struct hlist_node *);
bool hash_hashed(struct hlist_node *node) { return !hlist_unhashed(node); }


x86 assembly (clang, -O0):
<hash_hashed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hlist_unhashed@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_hashed>:
push   %rax
call   1030 <hlist_unhashed@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.hlist_node = type { i32 }
define i32 @hash_hashed(%struct.hlist_node* %0) {
%2 = alloca %struct.hlist_node*
store %struct.hlist_node* %0, %struct.hlist_node** %2
%3 = load %struct.hlist_node*, %struct.hlist_node** %2
%4 = call i32 @hlist_unhashed(%struct.hlist_node* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define i32 @hash_hashed(%struct.hlist_node* %0) {
%2 = tail call i32 @hlist_unhashed(%struct.hlist_node* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int _aes_sub_bytes(const int box[][16], const char n) {
  return box[(n >> 4) & 0xf][n & 0xf];
}


x86 assembly (clang, -O0):
<_aes_sub_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl -0x9(%rbp),%ecx
sar    $0x4,%ecx
and    $0xf,%ecx
movslq %ecx,%rcx
shl    $0x6,%rcx
add    %rcx,%rax
movsbl -0x9(%rbp),%ecx
and    $0xf,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_aes_sub_bytes>:
mov    %esi,%eax
and    $0xf0,%eax
and    $0xf,%esi
lea    (%rdi,%rax,4),%rax
mov    (%rax,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @_aes_sub_bytes([16 x i32]* %0, i8 signext %1) {
%3 = alloca [16 x i32]*
%4 = alloca i8
store [16 x i32]* %0, [16 x i32]** %3
store i8 %1, i8* %4
%5 = load [16 x i32]*, [16 x i32]** %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = ashr i32 %7, 4
%9 = and i32 %8, 15
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 %10
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = and i32 %13, 15
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %15
%17 = load i32, i32* %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @_aes_sub_bytes([16 x i32]* nocapture %0, i8 signext %1) {
%3 = zext i8 %1 to i32
%4 = lshr i32 %3, 4
%5 = zext i32 %4 to i64
%6 = and i32 %3, 15
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %0, i64 %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void func1(char *str) { printf("func1: %s", str); }


x86 assembly (clang, -O0):
<func1>:
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):
<func1>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"func1: %s\00"
define void @func1(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_new_extended() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_new_extended"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_stream_new_extended\00"
define i32 @pa_stream_new_extended() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *s2 = malloc(strlen(s) + 1);
  strcpy(s2, s);
  return s2;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i = 10;
  i = i-- - --i * (i = -3) * i++ + ++i;
  printf("i = %d\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
movl   $0xfffffffd,-0x4(%rbp)
imul   $0xfffffffd,%ecx,%ecx
mov    -0x4(%rbp),%edx
mov    %edx,%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
imul   %edx,%ecx
sub    %ecx,%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 -63)
ret i32 0
}