xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xef() {
  Assert_real((isprint(239) == 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_isprint.c",
              1200, ("isprint should be 0 for 0xef"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xef>:
push   %rax
mov    $0xef,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b0,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xef\00"
define void @t_isprint_0xef() {
%1 = call i64 @isprint(i32 239)
%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 1200, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xef\00"
define void @t_isprint_0xef() {
%1 = tail call i64 @isprint(i32 239)
%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 1200, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *frgl_malloc(int sz) {
  void *ptr;
  ptr = malloc(sz);
  memset(ptr, 0, sz);
  return (ptr);
}


x86 assembly (clang, -O0):
<frgl_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frgl_malloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @frgl_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @memset(i8* %6, i32 0, i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @frgl_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
void LedsP$Led1$makeOutput(void) { NoPinC$0$GeneralIO$makeOutput(); }


x86 assembly (clang, -O0):
<LedsP$Led1$makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <NoPinC$0$GeneralIO$makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led1$makeOutput>:
xor    %eax,%eax
jmp    1030 <NoPinC$0$GeneralIO$makeOutput@plt>

LLVM IR (-O0):
define void @"LedsP$Led1$makeOutput"() {
%1 = call i32 (...) @"NoPinC$0$GeneralIO$makeOutput"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led1$makeOutput"() {
%1 = tail call i32 (...) @"NoPinC$0$GeneralIO$makeOutput"()
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ internal_fiat_p256_nonzero(uintptr_t);
void fiat_p256_nonzero(uint64_t *out1, const uint64_t arg1[4]) {
  *out1 = (uint64_t)internal_fiat_p256_nonzero((uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p256_nonzero>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <internal_fiat_p256_nonzero@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fiat_p256_nonzero(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = ptrtoint i64* %5 to i64
%7 = call i64 @internal_fiat_p256_nonzero(i64 %6)
%8 = load i64*, i64** %3
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @fiat_p256_nonzero(i64* nocapture writeonly %0, i64* %1) {
%3 = ptrtoint i64* %1 to i64
%4 = tail call i64 @internal_fiat_p256_nonzero(i64 %3)
store i64 %4, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
ge() {
  ol("CMP  BX,AX");
  ol("MOV  AX,1");
  ol("JGE  $+5");
  ol("MOV  AX,0");
}


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

x86 assembly (clang, -O2):
<ge>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ol@plt>
lea    0xee7(%rip),%rdi
call   1030 <ol@plt>
lea    0xee5(%rip),%rdi
call   1030 <ol@plt>
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"CMP BX,AX\00"
@.str.1 = [10 x i8] c"MOV AX,1\00"
@.str.2 = [9 x i8] c"JGE $+5\00"
@.str.3 = [10 x i8] c"MOV AX,0\00"
define i32 @ge() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"CMP BX,AX\00"
@.str.1 = [10 x i8] c"MOV AX,1\00"
@.str.2 = [9 x i8] c"JGE $+5\00"
@.str.3 = [10 x i8] c"MOV AX,0\00"
define i32 @ge() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
int execute_signalfd4() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_signalfd4() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_signalfd4() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
bool correctCallForm(int argc, char *argv[]) {
  if ((argc != 2) && (argc != 4)) {
    fprintf(stderr, "Invalid number of arguments given\n");
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<correctCallForm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1154 <correctCallForm+0x44>
cmpl   $0x4,-0x8(%rbp)
je     1154 <correctCallForm+0x44>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    115b <correctCallForm+0x4b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<correctCallForm>:
mov    $0x1,%eax
cmp    $0x2,%edi
je     111f <correctCallForm+0xf>
cmp    $0x4,%edi
jne    1120 <correctCallForm+0x10>
ret
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Invalid number of arguments given\0A\00"
define i32 @correctCallForm(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 4
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %15
14: ; preds = %8, %2
store i32 1, i32* %3
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Invalid number of arguments given\0A\00"
define i32 @correctCallForm(i32 %0, i8** nocapture readnone %1) {
switch i32 %0, label %3 [
i32 4, label %6
i32 2, label %6
]
3: ; preds = %2
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %2, %2, %3
%7 = phi i32 [ 0, %3 ], [ 1, %2 ], [ 1, %2 ]
ret i32 %7
}
int xen_unregister_device_domain_owner(struct pci_dev *dev) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @xen_unregister_device_domain_owner(%struct.pci_dev* nocapture readnone %0) {
ret i32 -1
}
int main() {
  unsigned short arg1 = 0x1234;
  unsigned short arg2 = 0x5678;
  unsigned short out1 = 0;
  unsigned short out2 = 0;
  __asm__("xchgw %%ax, %%cx" : "=a"(out1), "=c"(out2) : "a"(arg1), "c"(arg2));
  return (out1 == 0x5678) && (out2 == 0x1234);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movw   $0x1234,-0x6(%rbp)
movw   $0x5678,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
mov    -0x6(%rbp),%ax
mov    -0x8(%rbp),%cx
xchg   %ax,%cx
mov    %ax,-0xa(%rbp)
mov    %cx,-0xc(%rbp)
movzwl -0xa(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5678,%ecx
mov    %al,-0xd(%rbp)
jne    1159 <main+0x59>
movzwl -0xc(%rbp),%eax
cmp    $0x1234,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1234,%ax
mov    $0x5678,%cx
xchg   %ax,%cx
xor    $0x5678,%eax
xor    $0x1234,%ecx
xor    %edx,%edx
or     %ax,%cx
sete   %dl
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i32 0, i32* %1
store i16 4660, i16* %2
store i16 22136, i16* %3
store i16 0, i16* %4
store i16 0, i16* %5
%6 = load i16, i16* %2
%7 = load i16, i16* %3
%8 = call { i16, i16 } asm "xchgw %ax, %cx", "={ax},={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i16 %6, i16 %7)
%9 = extractvalue { i16, i16 } %8, 0
%10 = extractvalue { i16, i16 } %8, 1
store i16 %9, i16* %4
store i16 %10, i16* %5
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = icmp eq i32 %12, 22136
br i1 %13, label %14, label %18
14: ; preds = %0
%15 = load i16, i16* %5
%16 = zext i16 %15 to i32
%17 = icmp eq i32 %16, 4660
br label %18
18: ; preds = %14, %0
%19 = phi i1 [ false, %0 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call { i16, i16 } asm "xchgw %ax, %cx", "={ax},={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i16 4660, i16 22136)
%2 = extractvalue { i16, i16 } %1, 0
%3 = extractvalue { i16, i16 } %1, 1
%4 = icmp eq i16 %2, 22136
%5 = icmp eq i16 %3, 4660
%6 = select i1 %4, i1 %5, i1 false
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ BIO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ PKCS7_it;
int i2d_ASN1_bio_stream(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                        int /*<<< orphan*/ *, int, int /*<<< orphan*/ *);
int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags) {
  return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags, &PKCS7_it);
}


x86 assembly (clang, -O0):
<i2d_PKCS7_bio_stream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    0x2ea3(%rip),%r8
call   1030 <i2d_ASN1_bio_stream@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_PKCS7_bio_stream>:
mov    0x2ec9(%rip),%r8
jmp    1030 <i2d_ASN1_bio_stream@plt>

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

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32 @i2d_PKCS7_bio_stream(i32* %0, i32* %1, i32* %2, i32 %3) {
%5 = tail call i32 @i2d_ASN1_bio_stream(i32* %0, i32* %1, i32* %2, i32 %3, i32* @PKCS7_it)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ term_clear();
int /*<<< orphan*/ term_color(int, int);
int /*<<< orphan*/ term_coloroff();
int /*<<< orphan*/ term_goto(int, int);
int main() {
  term_clear();
  term_color(47, 31);
  printf("Hello World\n");
  term_coloroff();
  term_goto(5, 8);
  printf("I'm Row=5 Col=8");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <term_clear@plt>
mov    $0x2f,%edi
mov    $0x1f,%esi
call   1060 <term_color@plt>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <term_coloroff@plt>
mov    $0x5,%edi
mov    $0x8,%esi
call   1030 <term_goto@plt>
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <term_clear@plt>
mov    $0x2f,%edi
mov    $0x1f,%esi
call   1070 <term_color@plt>
lea    0xe92(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <term_coloroff@plt>
mov    $0x5,%edi
mov    $0x8,%esi
call   1040 <term_goto@plt>
lea    0xe60(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [16 x i8] c"I'm Row=5 Col=8\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @term_clear()
%3 = call i32 @term_color(i32 47, i32 31)
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @term_coloroff()
%6 = call i32 @term_goto(i32 5, i32 8)
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"I'm Row=5 Col=8\00"
@str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 (...) @term_clear()
%2 = tail call i32 @term_color(i32 47, i32 31)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @term_coloroff()
%5 = tail call i32 @term_goto(i32 5, i32 8)
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int main() {
  int n = sizeof(int) * 8 * 2;
  int i = 1;
  int max_value_plus_one = 1;
  for (i = 0; i < n - 1; i++) {
    max_value_plus_one = max_value_plus_one * 2;
  }
  return max_value_plus_one;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x40,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    114f <main+0x4f>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <main+0x27>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 64, i32* %2
store i32 1, i32* %3
store i32 1, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i32, i32* %4
%12 = mul nsw i32 %11, 2
store i32 %12, i32* %4
br label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(int argc, char **argv) {
  foo(1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 1)
ret i32 0
}
/* Variables and functions */
int __raw_readb(int);
int /*<<< orphan*/ __raw_writeb(int, int);
void putc(int c) {
  int i;
  for (i = 0; i < 1000; i++) {
    if (!(__raw_readb(0x808d0018) & 0x20))
      break;
  }
  __raw_writeb(c, 0x808d0000);
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    116d <putc+0x4d>
mov    $0x808d0018,%edi
call   1030 <__raw_readb@plt>
and    $0x20,%eax
cmp    $0x0,%eax
jne    115a <putc+0x3a>
jmp    116d <putc+0x4d>
jmp    115f <putc+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <putc+0x12>
mov    -0x4(%rbp),%edi
mov    $0x808d0000,%esi
call   1040 <__raw_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x3e7,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x808d0018,%edi
call   1030 <__raw_readb@plt>
sub    $0x1,%ebp
setb   %cl
test   $0x20,%al
je     1148 <putc+0x28>
test   %cl,%cl
je     1130 <putc+0x10>
mov    %ebx,%edi
mov    $0x808d0000,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <__raw_writeb@plt>

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = call i32 @__raw_readb(i32 -2138243048)
%9 = and i32 %8, 32
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
br label %16
12: ; preds = %7
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %11, %4
%17 = load i32, i32* %2
%18 = call i32 @__raw_writeb(i32 %17, i32 -2138243072)
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %7, %2 ]
%4 = tail call i32 @__raw_readb(i32 -2138243048)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 1000
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @__raw_writeb(i32 %0, i32 -2138243072)
ret void
}
double getEfficiency_matchg32(int ilimit, int olimit) { return 1; }


x86 assembly (clang, -O0):
<getEfficiency_matchg32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  0xeee(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getEfficiency_matchg32>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @getEfficiency_matchg32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @getEfficiency_matchg32(i32 %0, i32 %1) {
ret double 1.000000e+00
}
void ff_hevc_idct_32x32_8_sse2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_idct_32x32_8_sse2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int a = 0;
  if (a == 1) {
    printf("Booleans are working!!\n");
  } else {
    printf("Booleans are still working!!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [29 x i8] c"Booleans are still working!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int xgetline(char *, int);
main() {
  int len;
  char line[1000];
  while ((len = xgetline(line, 1000)) > 0)
    if (len > 80)
      printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <xgetline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x50,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <xgetline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <xgetline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @xgetline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @xgetline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_cmd_add(char *, int /*<<< orphan*/);
void cmd_add(char *arg) { do_cmd_add(arg, 0); }


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

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

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

LLVM IR (-O2):
define void @cmd_add(i8* %0) {
%2 = tail call i32 @do_cmd_add(i8* %0, i32 0)
ret void
}
void xtables_unlock(int lock) {}


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

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

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

LLVM IR (-O2):
define void @xtables_unlock(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;
typedef scalar_t__ i;

/* Variables and functions */
uint16_t avg16(uint16_t i, uint16_t j) {
  return (uint32_t)((uint32_t)(i) + (uint32_t)(j)) >> 1;
}


x86 assembly (clang, -O0):
<avg16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg16>:
lea    (%rdi,%rsi,1),%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @avg16(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 = add nsw i32 %5, %6
%8 = ashr i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @avg16(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = ashr i32 %3, 1
ret i32 %4
}
unsigned short inw(int p) {
  unsigned short v;
  __asm__ __volatile__("inw %w1, %w0" : "=a"(v) : "Nd"(p));
  return v;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw(i32 %0) {
%2 = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ floats_quat_to_mat44(float *, float *);
int /*<<< orphan*/ floats_rpy_to_quat(float const *, float *);
void floats_rpy_to_mat44(const float rpy[3], float M[16]) {
  float q[4];
  floats_rpy_to_quat(rpy, q);
  floats_quat_to_mat44(q, M);
}


x86 assembly (clang, -O0):
<floats_rpy_to_mat44>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <floats_rpy_to_quat@plt>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <floats_quat_to_mat44@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_rpy_to_mat44>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <floats_rpy_to_quat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <floats_quat_to_mat44@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @floats_rpy_to_mat44(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [4 x float]
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%8 = call i32 @floats_rpy_to_quat(float* %6, float* %7)
%9 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%10 = load float*, float** %4
%11 = call i32 @floats_quat_to_mat44(float* %9, float* %10)
ret void
}

LLVM IR (-O2):
define void @floats_rpy_to_mat44(float* %0, float* %1) {
%3 = alloca [4 x float]
%4 = bitcast [4 x float]* %3 to i8*
%5 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%6 = call i32 @floats_rpy_to_quat(float* %0, float* %5)
%7 = call i32 @floats_quat_to_mat44(float* %5, float* %1)
ret void
}
int callback(void *NotUsed, int argc, char **argv, char **col_name) {}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @callback(i8* %0, i32 %1, i8** %2, i8** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8**
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @callback(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, i8** nocapture readnone %3) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ wcrtomb(char *, int /*<<< orphan*/, int /*<<< orphan*/ *);
void uninivar_wcrtomb(void) {
  char *s;
  wchar_t wc;
  mbstate_t *ps;
  (void)wcrtomb(s, wc, ps);
}


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

x86 assembly (clang, -O2):
<uninivar_wcrtomb>:
jmp    1030 <wcrtomb@plt>

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

LLVM IR (-O2):
define void @uninivar_wcrtomb() {
%1 = tail call i32 @wcrtomb(i8* undef, i32 undef, i32* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int getinput(void) {
  int inp;
  inp = -1;
  while (0 > inp) {
    scanf("%d", &inp);
    if (0 > inp) {
      printf("I need a non-negative number: ");
    }
  }
  return inp;
}


x86 assembly (clang, -O0):
<getinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jle    1166 <getinput+0x46>
lea    0xebf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jle    1161 <getinput+0x41>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <getinput+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getinput>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xec8(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0xebf(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jns    1173 <getinput+0x53>
mov    %r15,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     1150 <getinput+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [31 x i8] c"I need a non-negative number: \00"
define i32 @getinput() {
%1 = alloca i32
store i32 -1, i32* %1
br label %2
2: ; preds = %11, %0
%3 = load i32, i32* %1
%4 = icmp sgt i32 0, %3
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp sgt i32 0, %7
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
br label %2
12: ; preds = %2
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [31 x i8] c"I need a non-negative number: \00"
define i32 @getinput() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
br label %3
3: ; preds = %0, %7
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %3, %7
%12 = phi i32 [ %9, %7 ], [ %5, %3 ]
ret i32 %12
}
/* Variables and functions */
float sinf(float);
float u_sinc(const float x, const float p) {
  return sinf((3.1416f) * x * p) / ((3.1416f) * x * p);
}


x86 assembly (clang, -O0):
<u_sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xed6(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
call   1030 <sinf@plt>
movss  0xebf(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_sinc>:
push   %rax
mulss  0xee7(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <sinf@plt>
divss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @u_sinc(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fmul float 0x400921FF20000000, %5
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = call float @sinf(float %8)
%10 = load float, float* %3
%11 = fmul float 0x400921FF20000000, %10
%12 = load float, float* %4
%13 = fmul float %11, %12
%14 = fdiv float %9, %13
ret float %14
}

LLVM IR (-O2):
define float @u_sinc(float %0, float %1) {
%3 = fmul float %0, 0x400921FF20000000
%4 = fmul float %3, %1
%5 = tail call float @sinf(float %4)
%6 = fdiv float %5, %4
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int unlink(const char *pathname) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<unlink>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @unlink(i8* nocapture readnone %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int /*<<< orphan*/ AES_set_encrypt_key(unsigned char const *, int const,
                                       int /*<<< orphan*/ *);
void JTR_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
                             AES_KEY *key) {
  AES_set_encrypt_key(userKey, bits, key);
}


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

x86 assembly (clang, -O2):
<JTR_AES_set_encrypt_key>:
jmp    1030 <AES_set_encrypt_key@plt>

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

LLVM IR (-O2):
define void @JTR_AES_set_encrypt_key(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @AES_set_encrypt_key(i8* %0, i32 %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo(int);
int main() {
  int valor = 2;
  int x = 0;
  x = foo(valor) + 1 + foo(valor);
#pragma omp taskwait
  assert(x == 7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <foo@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <foo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
call   1040 <foo@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <foo@plt>
add    %ebx,%eax
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %1
%4 = call i32 @foo(i32 %3)
%5 = add nsw i32 %4, 1
%6 = load i32, i32* %1
%7 = call i32 @foo(i32 %6)
%8 = add nsw i32 %5, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 7
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
%2 = add nsw i32 %1, 1
%3 = tail call i32 @foo(i32 2)
%4 = add nsw i32 %2, %3
%5 = icmp eq i32 %4, 7
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_size(int);
void size5(void) { set_size(5); }


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

x86 assembly (clang, -O2):
<size5>:
mov    $0x5,%edi
jmp    1030 <set_size@plt>

LLVM IR (-O0):
define void @size5() {
%1 = call i32 @set_size(i32 5)
ret void
}

LLVM IR (-O2):
define void @size5() {
%1 = tail call i32 @set_size(i32 5)
ret void
}
int execute_dup3() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_dup3() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_dup3() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printnum(long n) {
  if (n < 0) {
    printf("-");
    n = -n;
  }
  if (n >= 10)
    printnum(n / 10);
  printf("%d", n % 10);
}


x86 assembly (clang, -O0):
<printnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114f <printnum+0x2f>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0xa,-0x8(%rbp)
jl     1170 <printnum+0x50>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1040 <printnum@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rdx,%rsi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printnum>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rdi,%rdi
jns    1149 <printnum+0x19>
mov    $0x2d,%edi
call   1030 <putchar@plt>
neg    %rbx
movabs $0xcccccccccccccccd,%r14
cc cc cc
cmp    $0xa,%rbx
jb     116b <printnum+0x3b>
mov    %rbx,%rax
mul    %r14
mov    %rdx,%rdi
shr    $0x3,%rdi
call   1050 <printnum@plt>
mov    %rbx,%rax
mul    %r14
shr    $0x2,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,4),%rax
sub    %rax,%rbx
lea    0xe79(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
define void @printnum(i64 %0) {
%2 = icmp slt i64 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @putchar(i32 45)
%5 = sub nsw i64 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i64 [ %5, %3 ], [ %0, %1 ]
%8 = icmp ugt i64 %7, 9
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = udiv i64 %7, 10
tail call void @printnum(i64 %10)
br label %11
11: ; preds = %9, %6
%12 = urem i64 %7, 10
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 %12)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void interface_init() {
  (*(volatile uint32_t *)(0x014 + 0xE000E000)) = 0x00FFFFFF;
  (*(volatile uint32_t *)(0x010 + 0xE000E000)) = 5;
}


x86 assembly (clang, -O0):
<interface_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e014,%eax
movl   $0xffffff,(%rax)
mov    $0xe000e010,%eax
movl   $0x5,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<interface_init>:
mov    $0xe000e010,%eax
movl   $0xffffff,0x4(%rax)
movl   $0x5,(%rax)
ret

LLVM IR (-O0):
define void @interface_init() {
store volatile i32 16777215, i32* inttoptr (i64 3758153748 to i32*)
store volatile i32 5, i32* inttoptr (i64 3758153744 to i32*)
ret void
}

LLVM IR (-O2):
define void @interface_init() {
store volatile i32 16777215, i32* inttoptr (i64 3758153748 to i32*)
store volatile i32 5, i32* inttoptr (i64 3758153744 to i32*)
ret void
}
const char *vedis_lib_ident(void) {
  return "vedis:e361b2f3d4a71ac17e9f2ac1876232a13467dea1";
}


x86 assembly (clang, -O0):
<vedis_lib_ident>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [47 x i8] c"vedis:e361b2f3d4a71ac17e9f2ac1876232a13467dea1\00"
define i8* @vedis_lib_ident() {
ret i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [47 x i8] c"vedis:e361b2f3d4a71ac17e9f2ac1876232a13467dea1\00"
define i8* @vedis_lib_ident() {
ret i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_reset_solar_short() {
  mbus_remote_register_write(
      0x6, 0x0E, ((1 << 10) | (1 << 9) | (0 << 8) | (3 << 4) | (0)));
  delay(200);
  mbus_remote_register_write(
      0x6, 0x0E, ((1 << 10) | (0 << 9) | (0 << 8) | (3 << 4) | (0)));
  delay(200);
}


x86 assembly (clang, -O0):
<pmu_reset_solar_short>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0x630,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0x430,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_reset_solar_short>:
push   %rax
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0x630,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0x430,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_reset_solar_short() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 14, i32 1584)
%2 = call i32 @delay(i32 200)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 14, i32 1072)
%4 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
define void @pmu_reset_solar_short() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 14, i32 1584)
%2 = tail call i32 @delay(i32 200)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 14, i32 1072)
%4 = tail call i32 @delay(i32 200)
ret void
}
/* Variables and functions */
int rename(char const *, char const *);
int file_rename(const char *src, const char *dst) { return rename(src, dst); }


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

x86 assembly (clang, -O2):
<file_rename>:
jmp    1030 <rename@plt>

LLVM IR (-O0):
define i32 @file_rename(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 = load i8*, i8** %4
%7 = call i32 @rename(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @file_rename(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int get_data_int();
int /*<<< orphan*/ send_int_to_srv(int);
int get_curr_time() {
  send_int_to_srv(0x0d);
  return get_data_int();
}


x86 assembly (clang, -O0):
<get_curr_time>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
call   1030 <send_int_to_srv@plt>
mov    $0x0,%al
call   1040 <get_data_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_curr_time>:
push   %rax
mov    $0xd,%edi
call   1030 <send_int_to_srv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <get_data_int@plt>

LLVM IR (-O0):
define i32 @get_curr_time() {
%1 = call i32 @send_int_to_srv(i32 13)
%2 = call i32 (...) @get_data_int()
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_curr_time() {
%1 = tail call i32 @send_int_to_srv(i32 13)
%2 = tail call i32 (...) @get_data_int()
ret i32 %2
}