xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ X509_REQ;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_REQ_it;
int i2d_X509_REQ(X509_REQ *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REQ_it);
}


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

x86 assembly (clang, -O2):
<i2d_X509_REQ>:
mov    0x2ee1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@X509_REQ_it = global i32 0
define i32 @i2d_X509_REQ(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @X509_REQ_it)
ret i32 %7
}

LLVM IR (-O2):
@X509_REQ_it = global i32 0
define i32 @i2d_X509_REQ(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @X509_REQ_it)
ret i32 %3
}
void ff_hevc_idct_32x32_10_sse2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_idct_32x32_10_sse2() {
ret void
}
int auth_server(const struct ucred *creds) { return 1; }


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

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

LLVM IR (-O0):
%struct.ucred = type opaque
define i32 @auth_server(%struct.ucred* %0) {
%2 = alloca %struct.ucred*
store %struct.ucred* %0, %struct.ucred** %2
ret i32 1
}

LLVM IR (-O2):
%struct.ucred = type opaque
define i32 @auth_server(%struct.ucred* nocapture readnone %0) {
ret i32 1
}
int SRC(int mv) { return mv & 255; }


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

x86 assembly (clang, -O2):
<SRC>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @SRC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @SRC(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int cvmx_helper_get_first_ipd_port(int);
int cvmx_helper_get_last_ipd_port(int interface) {
  extern int cvmx_helper_ports_on_interface(int interface);
  return cvmx_helper_get_first_ipd_port(interface) +
         cvmx_helper_ports_on_interface(interface) - 1;
}


x86 assembly (clang, -O0):
<cvmx_helper_get_last_ipd_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <cvmx_helper_get_first_ipd_port@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cvmx_helper_ports_on_interface@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvmx_helper_get_last_ipd_port>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <cvmx_helper_get_first_ipd_port@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <cvmx_helper_ports_on_interface@plt>
add    %r14d,%eax
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @cvmx_helper_get_last_ipd_port(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cvmx_helper_get_first_ipd_port(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @cvmx_helper_ports_on_interface(i32 %5)
%7 = add nsw i32 %4, %6
%8 = sub nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @cvmx_helper_get_last_ipd_port(i32 %0) {
%2 = tail call i32 @cvmx_helper_get_first_ipd_port(i32 %0)
%3 = tail call i32 @cvmx_helper_ports_on_interface(i32 %0)
%4 = add i32 %2, -1
%5 = add i32 %4, %3
ret i32 %5
}
void foo_2_1_1_2_2_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_2_2_2_1_2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int fread(void *, int, unsigned int, int /*<<< orphan*/ *);
int /*<<< orphan*/ myexit();
int /*<<< orphan*/ printf(char *, unsigned int);
void myfr(FILE *fd, void *data, unsigned size) {
  if (fread(data, 1, size, fd) == size)
    return;
  printf("\nError: incomplete input file, can't read %u bytes\n", size);
  myexit();
}


x86 assembly (clang, -O0):
<myfr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    -0x14(%rbp),%eax
jne    1166 <myfr+0x36>
jmp    117c <myfr+0x4c>
mov    -0x14(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <myexit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfr>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    %ebx,%eax
jne    1149 <myfr+0x19>
pop    %rbx
ret
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <myexit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"\0AError: incomplete input file, can't read %u bytes\0A\00"
define void @myfr(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @fread(i8* %7, i32 1, i32 %8, i32* %9)
%11 = load i32, i32* %6
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %3
br label %18
14: ; preds = %3
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @myexit()
br label %18
18: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0AError: incomplete input file, can't read %u bytes\0A\00"
define void @myfr(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fread(i8* %1, i32 1, i32 %2, i32* %0)
%5 = icmp eq i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %2)
%8 = tail call i32 (...) @myexit()
br label %9
9: ; preds = %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ write(int, char *, int);
int write_to_stick(int driver_file, char *message, int len) {
  if (write(driver_file, message, len) < 0) {
    printf("Write operation failed\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<write_to_stick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jge    1163 <write_to_stick+0x43>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <write_to_stick+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_stick>:
push   %rax
call   1040 <write@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1132 <write_to_stick+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [23 x i8] c"Write operation failed\00"
define i32 @write_to_stick(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ -1, %6 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x9b() {
  Assert_real((isspace(155) == 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_isspace.c",
              780, ("isspace should be 0 for 0x9b"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x9b>:
push   %rax
mov    $0x9b,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x30c,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x9b\00"
define void @t_isspace_0x9b() {
%1 = call i64 @isspace(i32 155)
%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 780, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x9b\00"
define void @t_isspace_0x9b() {
%1 = tail call i64 @isspace(i32 155)
%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 780, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IXUSR;
int /*<<< orphan*/ stat(char const *, struct stat *);
extern int is_exec(const char *path) {
  struct stat sr;
  if (!stat(path, &sr) && (S_IXUSR & sr.st_mode)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%eax
jne    1153 <is_exec+0x43>
mov    0x2eaf(%rip),%rax
mov    (%rax),%eax
and    -0x18(%rbp),%eax
cmp    $0x0,%eax
je     1153 <is_exec+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115a <is_exec+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_exec>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %eax,%eax
jne    1132 <is_exec+0x22>
mov    0x2ec4(%rip),%rcx
mov    (%rsp),%edx
mov    $0x1,%eax
test   %edx,(%rcx)
je     1132 <is_exec+0x22>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IXUSR = global i32 0
define i32 @is_exec(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* @S_IXUSR
%8 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = and i32 %9, %7
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %6, %1
br label %13
13: ; preds = %6, %12
%14 = phi i32 [ 0, %12 ], [ 1, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
void f(char *d) {
  const char a[26] = "abcdefghijklmnopqrstuvwxyz";
  memcpy(d, a, 20);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed4(%rip),%ax
mov    %ax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x14,%edx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x28,%rsp
movups 0xeef(%rip),%xmm0
movups %xmm0,0xa(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x14,%edx
call   1030 <memcpy@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.f.a = [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define void @f(i8* %0) {
%2 = alloca i8*
%3 = alloca [26 x i8]
store i8* %0, i8** %2
%4 = bitcast [26 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 20)
ret void
}

LLVM IR (-O2):
@__const.f.a = [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define void @f(i8* %0) {
%2 = alloca [26 x i8]
%3 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%4 = call i32 @memcpy(i8* %0, i8* %3, i32 20)
ret void
}
long int ft_labs(long int n) {
  if (n < 0)
    return (-n);
  return (n);
}


x86 assembly (clang, -O0):
<ft_labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <ft_labs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <ft_labs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @ft_labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int put_int_pair(int a, int b) {
  printf("(%d, %d)\n", a, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<put_int_pair>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"(%d, %d)\0A\00"
define i32 @put_int_pair(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 0
}
/* Variables and functions */
int(Memento_failAt)(int i) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Memento_failAt(i32 %0) {
ret i32 0
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Tcutil_get_bounds_exp_constrain(void *, void *,
                                                          int /*<<< orphan*/);
struct Cyc_Absyn_Exp *Cyc_Tcutil_get_bounds_exp(void *def, void *b) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Tcutil_get_bounds_exp_constrain(def, b, 0);
  return _T0;
}


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

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

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_get_bounds_exp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.Cyc_Absyn_Exp*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_get_bounds_exp_constrain(i8* %6, i8* %7, i32 0)
store %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp** %5
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
ret %struct.Cyc_Absyn_Exp* %9
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_get_bounds_exp(i8* %0, i8* %1) {
%3 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_get_bounds_exp_constrain(i8* %0, i8* %1, i32 0)
ret %struct.Cyc_Absyn_Exp* %3
}
/* Variables and functions */
int /*<<< orphan*/ notifyEvent(char *, int, int, void const *);
void sesc_postevent(int vaddr, int type, const void *sptr) {
  notifyEvent("sesc_postevent", vaddr, type, sptr);
}


x86 assembly (clang, -O0):
<sesc_postevent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecd(%rip),%rdi
call   1030 <notifyEvent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sesc_postevent>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee2(%rip),%rdi
jmp    1030 <notifyEvent@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"sesc_postevent\00"
define void @sesc_postevent(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @notifyEvent(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"sesc_postevent\00"
define void @sesc_postevent(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @notifyEvent(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i8* %2)
ret void
}
int isWhiteSpace(const char c) {
  switch (c) {
  case '\r':
  case '\n':
  case '\t':
  case '\v':
  case '\f':
  case ' ':
  case '\0':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1143 <isWhiteSpace+0x43>
jmp    111e <isWhiteSpace+0x1e>
mov    -0xc(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x5,%eax
jb     1143 <isWhiteSpace+0x43>
jmp    1132 <isWhiteSpace+0x32>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    114f <isWhiteSpace+0x4f>
jmp    1143 <isWhiteSpace+0x43>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isWhiteSpace+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhiteSpace>:
cmp    $0x20,%edi
ja     111d <isWhiteSpace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003e01,%rdx
bt     %rcx,%rdx
jae    111d <isWhiteSpace+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isWhiteSpace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 13, label %6
i32 10, label %6
i32 9, label %6
i32 11, label %6
i32 12, label %6
i32 32, label %6
i32 0, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isWhiteSpace(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 13, label %4
i32 10, label %4
i32 9, label %4
i32 11, label %4
i32 12, label %4
i32 32, label %4
i32 0, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
void rng_drand_seed(struct anon$18 *rngh, unsigned int seed) {
  rng_urand_seed(rngh, seed);
}


x86 assembly (clang, -O0):
<rng_drand_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <rng_urand_seed@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%"struct.anon$18" = type opaque
define void @rng_drand_seed(%"struct.anon$18"* %0, i32 %1) {
%3 = alloca %"struct.anon$18"*
%4 = alloca i32
store %"struct.anon$18"* %0, %"struct.anon$18"** %3
store i32 %1, i32* %4
%5 = load %"struct.anon$18"*, %"struct.anon$18"** %3
%6 = load i32, i32* %4
%7 = call i32 (%"struct.anon$18"*, i32, ...) bitcast (i32 (...)* @rng_urand_seed to i32 (%"struct.anon$18"*, i32, ...)*)(%"struct.anon$18"* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%"struct.anon$18" = type opaque
define void @rng_drand_seed(%"struct.anon$18"* %0, i32 %1) {
%3 = tail call i32 (%"struct.anon$18"*, i32, ...) bitcast (i32 (...)* @rng_urand_seed to i32 (%"struct.anon$18"*, i32, ...)*)(%"struct.anon$18"* %0, i32 %1)
ret void
}
int ____atomic_test_and_set_bit(unsigned int bit, unsigned long *p) {
  unsigned long flags;
  unsigned int res;
  unsigned long mask;
  unsigned long temp;
  mask = 1UL << (bit & 31U);
  p += bit >> 5;
  res = (unsigned int)(*p);
  (*p) = (unsigned long)((unsigned long)res | mask);
  return ((int)((unsigned long)res & mask));
}


x86 assembly (clang, -O0):
<____atomic_test_and_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x5,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
or     -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
and    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<____atomic_test_and_set_bit>:
mov    %edi,%ecx
and    $0x1f,%cl
mov    $0x1,%eax
shl    %cl,%rax
shr    $0x5,%edi
mov    (%rsi,%rdi,8),%r8
mov    %r8d,%edx
bts    %rcx,%rdx
mov    %rdx,(%rsi,%rdi,8)
and    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @____atomic_test_and_set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %3
store i64* %1, i64** %4
%9 = load i32, i32* %3
%10 = and i32 %9, 31
%11 = zext i32 %10 to i64
%12 = shl i64 1, %11
store i64 %12, i64* %7
%13 = load i32, i32* %3
%14 = lshr i32 %13, 5
%15 = load i64*, i64** %4
%16 = zext i32 %14 to i64
%17 = getelementptr inbounds i64, i64* %15, i64 %16
store i64* %17, i64** %4
%18 = load i64*, i64** %4
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = load i64, i64* %7
%24 = or i64 %22, %23
%25 = load i64*, i64** %4
store i64 %24, i64* %25
%26 = load i32, i32* %6
%27 = zext i32 %26 to i64
%28 = load i64, i64* %7
%29 = and i64 %27, %28
%30 = trunc i64 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @____atomic_test_and_set_bit(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 31
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = lshr i32 %0, 5
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, 4294967295
%11 = or i64 %10, %5
store i64 %11, i64* %8
%12 = and i64 %9, %5
%13 = trunc i64 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ tlog(char *, int, int, int);
int main(void) { tlog("logging %d - %d - %d...\n", 2, 62, 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
mov    $0x3e,%edx
mov    $0x3,%ecx
call   1030 <tlog@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [25 x i8] c"logging %d - %d - %d...\0A\00"
define i32 @main() {
%1 = tail call i32 @tlog(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 2, i32 62, i32 3)
ret i32 0
}
int squaredLengthOfwith(int deltaX, int deltaY) {
  return (deltaX * deltaX) + (deltaY * deltaY);
}


x86 assembly (clang, -O0):
<squaredLengthOfwith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squaredLengthOfwith>:
imul   %edi,%edi
imul   %esi,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @squaredLengthOfwith(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* %3
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @squaredLengthOfwith(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
%4 = mul nsw i32 %1, %1
%5 = add nuw nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x48() {
  Assert_real((iscntrl(72) == 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",
              365, ("iscntrl should be 0 for H"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x48>:
push   %rax
mov    $0x48,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x16d,%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 H\00"
define void @t_iscntrl_0x48() {
%1 = call i64 @iscntrl(i32 72)
%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 365, 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 H\00"
define void @t_iscntrl_0x48() {
%1 = tail call i64 @iscntrl(i32 72)
%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 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ l_free(int *);
scalar_t__ l_malloc(int);
int main(int argc, char *argv[]) {
  int *a = (int *)l_malloc(sizeof(int));
  l_free(a);
  l_free(a);
  return 0;
}


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    $0x4,%edi
call   1030 <l_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <l_free@plt>
mov    -0x18(%rbp),%rdi
call   1040 <l_free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1030 <l_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <l_free@plt>
mov    %rbx,%rdi
call   1040 <l_free@plt>
xor    %eax,%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 = call i64 @l_malloc(i32 4)
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %6
%9 = load i32*, i32** %6
%10 = call i32 @l_free(i32* %9)
%11 = load i32*, i32** %6
%12 = call i32 @l_free(i32* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @l_malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @l_free(i32* %4)
%6 = tail call i32 @l_free(i32* %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char const);
char const *skipSpaces(char const *);
const char *matchSpaces(const char *src) {
  return *src == '\0' || isspace(*src) ? skipSpaces(src) : NULL;
}


x86 assembly (clang, -O0):
<matchSpaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1152 <matchSpaces+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1164 <matchSpaces+0x44>
mov    -0x8(%rbp),%rdi
call   1040 <skipSpaces@plt>
mov    %rax,-0x10(%rbp)
jmp    116f <matchSpaces+0x4f>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    116f <matchSpaces+0x4f>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matchSpaces>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1137 <matchSpaces+0x17>
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1140 <matchSpaces+0x20>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <skipSpaces@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @matchSpaces(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @isspace(i8 signext %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4, %1
%8 = tail call i8* @skipSpaces(i8* %0)
br label %9
9: ; preds = %4, %7
%10 = phi i8* [ %8, %7 ], [ null, %4 ]
ret i8* %10
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void bail_out(const char *msg) {
  perror(msg);
  exit(-1 * errno);
}


x86 assembly (clang, -O0):
<bail_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
imul   $0xffffffff,(%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bail_out>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
xor    %edi,%edi
sub    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @bail_out(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @errno
%6 = mul nsw i32 -1, %5
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @bail_out(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @errno
%4 = sub nsw i32 0, %3
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void NBE_Logger(const char *msg) {}


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

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

LLVM IR (-O0):
define void @NBE_Logger(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @NBE_Logger(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int,
                                          int /*<<< orphan*/);
void wl_data_offer_send_action(struct wl_resource *resource_,
                               uint32_t dnd_action) {
  wl_resource_post_event(resource_, 2, dnd_action);
}


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

x86 assembly (clang, -O2):
<wl_data_offer_send_action>:
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <wl_resource_post_event@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
define void @wl_data_offer_send_action(%struct.wl_resource* %0, i32 %1) {
%3 = alloca %struct.wl_resource*
%4 = alloca i32
store %struct.wl_resource* %0, %struct.wl_resource** %3
store i32 %1, i32* %4
%5 = load %struct.wl_resource*, %struct.wl_resource** %3
%6 = load i32, i32* %4
%7 = call i32 @wl_resource_post_event(%struct.wl_resource* %5, i32 2, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_data_offer_send_action(%struct.wl_resource* %0, i32 %1) {
%3 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 2, i32 %1)
ret void
}
void foo537(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo537(i32 %0) {
ret void
}
void rotate(char *a, char *b, char *c, char *d) {
  char tmpA = *a, tmpB = *b, tmpC = *c, tmpD = *d;
  *b = tmpA;
  *c = tmpB;
  *d = tmpC;
  *a = tmpD;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x22(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x23(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x24(%rbp)
mov    -0x21(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x22(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x23(%rbp),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x24(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
mov    (%rdi),%al
mov    (%rsi),%r8b
mov    (%rdx),%r9b
mov    (%rcx),%r10b
mov    %al,(%rsi)
mov    %r8b,(%rdx)
mov    %r9b,(%rcx)
mov    %r10b,(%rdi)
ret

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

LLVM IR (-O2):
define void @rotate(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
%5 = load i8, i8* %0
%6 = load i8, i8* %1
%7 = load i8, i8* %2
%8 = load i8, i8* %3
store i8 %5, i8* %1
store i8 %6, i8* %2
store i8 %7, i8* %3
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
double loglike_psi(double *, int, void *, int *);
double fitfun(double *x, int n, void *output, int *info) {
  return loglike_psi(x, n, output, info);
}


x86 assembly (clang, -O0):
<fitfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <loglike_psi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitfun>:
jmp    1030 <loglike_psi@plt>

LLVM IR (-O0):
define double @fitfun(double* %0, i32 %1, i8* %2, i32* %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
store double* %0, double** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load double*, double** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32*, i32** %8
%13 = call double @loglike_psi(double* %9, i32 %10, i8* %11, i32* %12)
ret double %13
}

LLVM IR (-O2):
define double @fitfun(double* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call double @loglike_psi(double* %0, i32 %1, i8* %2, i32* %3)
ret double %5
}
/* Variables and functions */
int check_nth_bit(unsigned int, int);
int invert_nth_bit(unsigned int num, int n) {
  return check_nth_bit(num, n) ^ 1;
}


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

x86 assembly (clang, -O2):
<invert_nth_bit>:
push   %rax
call   1030 <check_nth_bit@plt>
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @invert_nth_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @check_nth_bit(i32 %5, i32 %6)
%8 = xor i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @invert_nth_bit(i32 %0, i32 %1) {
%3 = tail call i32 @check_nth_bit(i32 %0, i32 %1)
%4 = xor i32 %3, 1
ret i32 %4
}
char *showstring(s)
char *s;
{ return (s ? s : "(null)"); }


x86 assembly (clang, -O0):
<showstring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1120 <showstring+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <showstring+0x30>
lea    0xed9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <showstring+0x30>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<showstring>:
test   %rdi,%rdi
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
define i8* @showstring(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
extern int _sfcBasicAuthenticate(char *user, char *pw) {
  printf("-#- Authentication request for %s\n", user);
  return 0;
}


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

x86 assembly (clang, -O2):
<_sfcBasicAuthenticate>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [35 x i8] c"-#- Authentication request for %s\0A\00"
define i32 @_sfcBasicAuthenticate(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
typedef int uint16_t;
struct p4_field_match_exact {
  int dummy;
};

/* Variables and functions */
struct p4_field_match_exact *unpack_p4_field_match_exact(char *buffer,
                                                         uint16_t offset) {
  return (struct p4_field_match_exact *)(buffer + offset);
}


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

x86 assembly (clang, -O2):
<unpack_p4_field_match_exact>:
movslq %esi,%rax
add    %rdi,%rax
ret

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

LLVM IR (-O2):
%struct.p4_field_match_exact = type { i32 }
define %struct.p4_field_match_exact* @unpack_p4_field_match_exact(i8* readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to %struct.p4_field_match_exact*
ret %struct.p4_field_match_exact* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int V1 = 4;
  int V2 = V1 == 3 ? 2 : 1;
  printf("%d\n", V2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
mov    $0x2,%ecx
cmp    $0x3,%edx
cmove  %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 4, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 3
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 2, i32 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copy_from_pixmap();
int /*<<< orphan*/ xflush();
void x_flush__() {
  copy_from_pixmap();
  xflush();
}


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

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

LLVM IR (-O0):
define void @x_flush__() {
%1 = call i32 (...) @copy_from_pixmap()
%2 = call i32 (...) @xflush()
ret void
}

LLVM IR (-O2):
define void @x_flush__() {
%1 = tail call i32 (...) @copy_from_pixmap()
%2 = tail call i32 (...) @xflush()
ret void
}
void XtCvtStringToFontStruct() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToFontStruct() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int);
void coe_enable(int fd) { fcntl(fd, F_SETFD, 1); }


x86 assembly (clang, -O0):
<coe_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coe_enable>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_SETFD = global i32 0
define void @coe_enable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFD
%5 = call i32 @fcntl(i32 %3, i32 %4, i32 1)
ret void
}

LLVM IR (-O2):
@F_SETFD = global i32 0
define void @coe_enable(i32 %0) {
%2 = load i32, i32* @F_SETFD
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 1)
ret void
}