xunge/DecIR huggingface dataset:
int bdi_congested(struct backing_dev_info *bdi, int cong_bits) { return 0; }


x86 assembly (clang, -O0):
<bdi_congested>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.backing_dev_info = type opaque
define i32 @bdi_congested(%struct.backing_dev_info* %0, i32 %1) {
%3 = alloca %struct.backing_dev_info*
%4 = alloca i32
store %struct.backing_dev_info* %0, %struct.backing_dev_info** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.backing_dev_info = type opaque
define i32 @bdi_congested(%struct.backing_dev_info* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ pthread_self();
unsigned long ssl_id_function(void) { return ((unsigned long)pthread_self()); }


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

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

LLVM IR (-O0):
define i64 @ssl_id_function() {
%1 = call i64 (...) @pthread_self()
ret i64 %1
}

LLVM IR (-O2):
define i64 @ssl_id_function() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
/* Variables and functions */
char *getClassName(unsigned short);
int /*<<< orphan*/ printROMStr(char *);
void reportStackTraceIntro(unsigned short classIndex) {
  printROMStr("Exception in thread \"\" ");
  printROMStr(getClassName(classIndex));
  printROMStr("\n");
}


x86 assembly (clang, -O0):
<reportStackTraceIntro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printROMStr@plt>
movzwl -0x2(%rbp),%edi
call   1030 <getClassName@plt>
mov    %rax,%rdi
call   1040 <printROMStr@plt>
lea    0xec5(%rip),%rdi
call   1040 <printROMStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportStackTraceIntro>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <printROMStr@plt>
mov    %ebx,%edi
call   1030 <getClassName@plt>
mov    %rax,%rdi
call   1040 <printROMStr@plt>
lea    0xed3(%rip),%rdi
pop    %rbx
jmp    1040 <printROMStr@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Exception in thread \22\22 \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @reportStackTraceIntro(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @printROMStr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = load i16, i16* %2
%5 = call i8* @getClassName(i16 zeroext %4)
%6 = call i32 @printROMStr(i8* %5)
%7 = call i32 @printROMStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Exception in thread \22\22 \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @reportStackTraceIntro(i16 zeroext %0) {
%2 = tail call i32 @printROMStr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @getClassName(i16 zeroext %0)
%4 = tail call i32 @printROMStr(i8* %3)
%5 = tail call i32 @printROMStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int print(char **, char const *, unsigned long *);
int sprintf(char *dst, const char *fmt, ...) {
  register unsigned long *varg = (unsigned long *)(&fmt);
  *varg++;
  return print(&dst, fmt, varg);
}


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

x86 assembly (clang, -O2):
<sprintf>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdx
lea    0x10(%rsp),%rdi
call   1030 <print@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = bitcast i8** %4 to i64*
store i64* %6, i64** %5
%7 = load i64*, i64** %5
%8 = getelementptr inbounds i64, i64* %7, i32 1
store i64* %8, i64** %5
%9 = load i64, i64* %7
%10 = load i8*, i8** %4
%11 = load i64*, i64** %5
%12 = call i32 @print(i8** %3, i8* %10, i64* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = bitcast i8** %5 to i64*
%7 = call i32 @print(i8** %3, i8* %1, i64* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void PrintStringReverse(char *sz) {
  if (sz == NULL)
    return;
  if (*sz == 0)
    return;
  PrintStringReverse(sz + 1);
  printf("%c", *sz);
}


x86 assembly (clang, -O0):
<PrintStringReverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <PrintStringReverse+0x1c>
jmp    1171 <PrintStringReverse+0x51>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1151 <PrintStringReverse+0x31>
jmp    1171 <PrintStringReverse+0x51>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <PrintStringReverse@plt>
mov    -0x8(%rbp),%rax
lea    0xe97(%rip),%rdi
movsbl (%rax),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintStringReverse>:
push   %rbx
test   %rdi,%rdi
je     1147 <PrintStringReverse+0x27>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1147 <PrintStringReverse+0x27>
lea    0x1(%rbx),%rdi
call   1030 <PrintStringReverse@plt>
movsbl (%rbx),%esi
lea    0xebf(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @PrintStringReverse(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1, %3, %7
ret void
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @PrintStringReverse(i8* %8)
%9 = load i8, i8* %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
br label %6
}
int test_imm_F2uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xF2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F2uint64_lowword_reg>:
test   $0xf2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F2uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 242
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ update_tm(struct tm *, struct tm *, int /*<<< orphan*/);
void date_now(struct tm *tm, struct tm *now, int *num) {
  update_tm(tm, now, 0);
}


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @date_now(%struct.tm* %0, %struct.tm* %1, i32* %2) {
%4 = alloca %struct.tm*
%5 = alloca %struct.tm*
%6 = alloca i32*
store %struct.tm* %0, %struct.tm** %4
store %struct.tm* %1, %struct.tm** %5
store i32* %2, i32** %6
%7 = load %struct.tm*, %struct.tm** %4
%8 = load %struct.tm*, %struct.tm** %5
%9 = call i32 @update_tm(%struct.tm* %7, %struct.tm* %8, i32 0)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @date_now(%struct.tm* %0, %struct.tm* %1, i32* nocapture readnone %2) {
%4 = tail call i32 @update_tm(%struct.tm* %0, %struct.tm* %1, i32 0)
ret void
}
int do_add(int av1, int av3) { return (av1 + av3); }


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

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

LLVM IR (-O0):
define i32 @do_add(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
ret i32 %7
}

LLVM IR (-O2):
define i32 @do_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ alloc_init(int);
int /*<<< orphan*/ alloc_printstat();
int /*<<< orphan*/ recursive_test(int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  alloc_init(1 * 1000 * 1000);
  alloc_printstat();
  recursive_test(3, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xf4240,%edi
call   1050 <alloc_init@plt>
mov    $0x0,%al
call   1030 <alloc_printstat@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <recursive_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf4240,%edi
call   1050 <alloc_init@plt>
xor    %eax,%eax
call   1030 <alloc_printstat@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <recursive_test@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @alloc_init(i32 1000000)
%4 = tail call i32 (...) @alloc_printstat()
%5 = tail call i32 @recursive_test(i32 3, i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ Cyc_Character_islower(unsigned char);
unsigned char Cyc_Character_toupper(unsigned char c) {
  if (Cyc_Character_islower(c)) {
    c += 'A' - 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<Cyc_Character_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <Cyc_Character_islower@plt>
cmp    $0x0,%rax
je     113b <Cyc_Character_toupper+0x2b>
movzbl -0x1(%rbp),%eax
add    $0xffffffe0,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Character_toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <Cyc_Character_islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @Cyc_Character_toupper(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @Cyc_Character_islower(i8 zeroext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = add nsw i32 %8, -32
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @Cyc_Character_toupper(i8 zeroext %0) {
%2 = tail call i64 @Cyc_Character_islower(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
int f1(volatile int *a) {
  int b = a[1];
  int c = a[0];
  return b + c;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    0x4(%rdi),%eax
add    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f1(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load volatile i32, i32* %6
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load volatile i32, i32* %9
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @f1(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* %0
%5 = add nsw i32 %4, %3
ret i32 %5
}
int Cyc_Core_false_f(void *x) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Cyc_Core_false_f(i8* nocapture readnone %0) {
ret i32 0
}
int c40_wipe(c40)
int c40;
{ return (ioctl(c40, (_IO('v', 27)), 0)); }


x86 assembly (clang, -O0):
<c40_wipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x76,%edi
mov    $0x1b,%esi
mov    $0x0,%al
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c40_wipe>:
push   %rbx
mov    %edi,%ebx
mov    $0x76,%edi
mov    $0x1b,%esi
xor    %eax,%eax
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @c40_wipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @_IO to i32 (i32, i32, ...)*)(i32 118, i32 27)
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32, ...)*)(i32 %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @c40_wipe(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @_IO to i32 (i32, i32, ...)*)(i32 118, i32 27)
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %2, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg16setBank0(int);
void s3setParamsF800(uint16_t addr, uint8_t val) {
  (void)addr;
  prg16setBank0(val << 14);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xe,%edi
jmp    1030 <prg16setBank0@plt>

LLVM IR (-O0):
define void @s3setParamsF800(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 = shl i32 %6, 14
%8 = call i32 @prg16setBank0(i32 %7)
ret void
}

LLVM IR (-O2):
define void @s3setParamsF800(i32 %0, i32 %1) {
%3 = shl i32 %1, 14
%4 = tail call i32 @prg16setBank0(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ init();
int /*<<< orphan*/ parse();
void main() {
  init();
  parse();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init@plt>
mov    $0x0,%al
call   1040 <parse@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init@plt>
xor    %eax,%eax
call   1040 <parse@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @init()
%2 = call i32 (...) @parse()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @parse()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_initialize_number_of_standard_Laurentials(int length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(123, &length, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_initialize_number_of_standard_Laurentials>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x7b,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_initialize_number_of_standard_Laurentials>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x7b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_initialize_number_of_standard_Laurentials(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 123, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_initialize_number_of_standard_Laurentials(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 123, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
char *_mktemp(char *);
char *bb_mktemp(char *path) { return (_mktemp(path)); }


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

x86 assembly (clang, -O2):
<bb_mktemp>:
jmp    1030 <_mktemp@plt>

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

LLVM IR (-O2):
define i8* @bb_mktemp(i8* %0) {
%2 = tail call i8* @_mktemp(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ cylindre_of_bloc(unsigned int, unsigned int);
int /*<<< orphan*/ sector_of_bloc(unsigned int, unsigned int);
int /*<<< orphan*/ write_sector(int /*<<< orphan*/, int /*<<< orphan*/,
                                unsigned char *);
void write_bloc(unsigned int vol, unsigned int blk, unsigned char *buffer) {
  if (vol < 8 && blk < 512) {
    write_sector(cylindre_of_bloc(vol, blk), sector_of_bloc(vol, blk), buffer);
  }
}


x86 assembly (clang, -O0):
<write_bloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x8,-0x4(%rbp)
jae    1180 <write_bloc+0x50>
cmpl   $0x200,-0x8(%rbp)
jae    1180 <write_bloc+0x50>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <cylindre_of_bloc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <sector_of_bloc@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1050 <write_sector@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_bloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x7,%edi
ja     1175 <write_bloc+0x45>
mov    %esi,%ebp
cmp    $0x1ff,%esi
ja     1175 <write_bloc+0x45>
mov    %rdx,%r14
mov    %edi,%ebx
mov    %ebp,%esi
call   1030 <cylindre_of_bloc@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <sector_of_bloc@plt>
mov    %r15d,%edi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <write_sector@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @write_bloc(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 = icmp ult i32 %7, 8
br i1 %8, label %9, label %21
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp ult i32 %10, 512
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @cylindre_of_bloc(i32 %13, i32 %14)
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @sector_of_bloc(i32 %16, i32 %17)
%19 = load i8*, i8** %6
%20 = call i32 @write_sector(i32 %15, i32 %18, i8* %19)
br label %21
21: ; preds = %12, %9, %3
ret void
}

LLVM IR (-O2):
define void @write_bloc(i32 %0, i32 %1, i8* %2) {
%4 = icmp ult i32 %0, 8
%5 = icmp ult i32 %1, 512
%6 = and i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i32 @cylindre_of_bloc(i32 %0, i32 %1)
%9 = tail call i32 @sector_of_bloc(i32 %0, i32 %1)
%10 = tail call i32 @write_sector(i32 %8, i32 %9, i8* %2)
br label %11
11: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(int /*<<< orphan*/ *);
size_t wstr_len(wchar_t *wstr) { return wcslen(wstr); }


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

x86 assembly (clang, -O2):
<wstr_len>:
jmp    1030 <wcslen@plt>

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

LLVM IR (-O2):
define i64 @wstr_len(i32* nocapture %0) {
%2 = tail call i64 @wcslen(i32* %0)
ret i64 %2
}
/* Variables and functions */
int pow(double, double);
double simp(double xi, double h) {
  return pow((xi - h), (double)7) + 4 * pow(xi, (double)7) +
         pow((xi + h), (double)7);
}


x86 assembly (clang, -O0):
<simp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0x2,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe93(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simp>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
subsd  %xmm1,%xmm0
movsd  0xed4(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
movsd  0xec0(%rip),%xmm1
call   1030 <pow@plt>
lea    (%rbx,%rax,4),%ebx
movsd  (%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0xea5(%rip),%xmm1
call   1030 <pow@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @simp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call i32 @pow(double %7, double 7.000000e+00)
%9 = load double, double* %3
%10 = call i32 @pow(double %9, double 7.000000e+00)
%11 = mul nsw i32 4, %10
%12 = add nsw i32 %8, %11
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fadd double %13, %14
%16 = call i32 @pow(double %15, double 7.000000e+00)
%17 = add nsw i32 %12, %16
%18 = sitofp i32 %17 to double
ret double %18
}

LLVM IR (-O2):
define double @simp(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i32 @pow(double %3, double 7.000000e+00)
%5 = tail call i32 @pow(double %0, double 7.000000e+00)
%6 = shl nsw i32 %5, 2
%7 = add nsw i32 %6, %4
%8 = fadd double %0, %1
%9 = tail call i32 @pow(double %8, double 7.000000e+00)
%10 = add nsw i32 %7, %9
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
int open(char *, int);
void openfiddle() {
  while (open("/dev/null", 1) < 7)
    ;
}


x86 assembly (clang, -O0):
<openfiddle>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <openfiddle+0x9>
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
call   1030 <open@plt>
cmp    $0x7,%eax
jge    1138 <openfiddle+0x28>
jmp    1119 <openfiddle+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openfiddle>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <open@plt>
cmp    $0x7,%eax
jl     1120 <openfiddle+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
define void @openfiddle() {
br label %1
1: ; preds = %4, %0
%2 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = icmp slt i32 %2, 7
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
define void @openfiddle() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = icmp slt i32 %2, 7
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void stub1();
void f3(void (*f)(void), void (*g)(void)) {
  clang_analyzer_eval(!f);
  f();
  clang_analyzer_eval(!f);
  clang_analyzer_eval(!g);
  (*g)();
  clang_analyzer_eval(!g);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
call   *-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
call   *-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %ebp,%ebp
test   %rdi,%rdi
sete   %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
call   *%rbx
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %ebx,%ebx
test   %r14,%r14
sete   %bl
mov    %ebx,%edi
call   1030 <clang_analyzer_eval@plt>
call   *%r14
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @f3(void ()* %0, void ()* %1) {
%3 = alloca void ()*
%4 = alloca void ()*
store void ()* %0, void ()** %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %3
%6 = icmp ne void ()* %5, null
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = call i32 @clang_analyzer_eval(i32 %8)
%10 = load void ()*, void ()** %3
%11 = load void ()*, void ()** %3
%12 = icmp ne void ()* %11, null
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
%16 = load void ()*, void ()** %4
%17 = icmp ne void ()* %16, null
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
%21 = load void ()*, void ()** %4
%22 = load void ()*, void ()** %4
%23 = icmp ne void ()* %22, null
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = call i32 @clang_analyzer_eval(i32 %25)
ret void
}

LLVM IR (-O2):
define void @f3(void ()* %0, void ()* %1) {
%3 = icmp eq void ()* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
tail call void %0()
%6 = tail call i32 @clang_analyzer_eval(i32 %4)
%7 = icmp eq void ()* %1, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @clang_analyzer_eval(i32 %8)
tail call void %1()
%10 = tail call i32 @clang_analyzer_eval(i32 %8)
ret void
}
/* Variables and functions */
bool match_blank_suffix(char *suffix) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @match_blank_suffix(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct image_object {
  int dummy;
};

/* Variables and functions */
int _singularity_image_check(struct image_object *);
int singularity_image_check(struct image_object *image) {
  return (_singularity_image_check(image));
}


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

x86 assembly (clang, -O2):
<singularity_image_check>:
jmp    1030 <_singularity_image_check@plt>

LLVM IR (-O0):
%struct.image_object = type { i32 }
define i32 @singularity_image_check(%struct.image_object* %0) {
%2 = alloca %struct.image_object*
store %struct.image_object* %0, %struct.image_object** %2
%3 = load %struct.image_object*, %struct.image_object** %2
%4 = call i32 @_singularity_image_check(%struct.image_object* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.image_object = type { i32 }
define i32 @singularity_image_check(%struct.image_object* %0) {
%2 = tail call i32 @_singularity_image_check(%struct.image_object* %0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ map_entries;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
int get_Visual_map_entries(void *_p) {
  return (int)((Visual *)_p)->map_entries;
}


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

x86 assembly (clang, -O2):
<get_Visual_map_entries>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_Visual_map_entries(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_Visual_map_entries(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char *removeComment(char *s) {
  char *p = s;
  while (*p && (*p != '!') && (*p != '#'))
    p++;
  *p = 0;
  return s;
}


x86 assembly (clang, -O0):
<removeComment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     114a <removeComment+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
mov    %al,-0x11(%rbp)
je     114a <removeComment+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115a <removeComment+0x5a>
jmp    116b <removeComment+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <removeComment+0x10>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeComment>:
mov    %rdi,%rax
movabs $0xa00000001,%rdx
mov    %rdi,%rcx
jmp    1124 <removeComment+0x24>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rcx
movzbl (%rcx),%esi
cmp    $0x23,%rsi
ja     1120 <removeComment+0x20>
bt     %rsi,%rdx
jae    1120 <removeComment+0x20>
movb   $0x0,(%rcx)
ret

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

LLVM IR (-O2):
define i8* @removeComment(i8* returned %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 33, label %7
i8 35, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
store i8 0, i8* %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ write_message(char const *, char *);
void write_log(const char *message) { write_message(message, "[LOG]"); }


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

x86 assembly (clang, -O2):
<write_log>:
lea    0xee9(%rip),%rsi
jmp    1030 <write_message@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"[LOG]\00"
define void @write_log(i8* %0) {
%2 = tail call i32 @write_message(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
int /*<<< orphan*/ VIM_HIF_SetReg8(int, int /*<<< orphan*/);
unsigned long VIM_MARB_GetThumbBufChipPointer(void) {
  unsigned long Temp = 0;
  VIM_HIF_SetReg8((0x2400 + 0x063), 0);
  Temp = (unsigned long)VIM_HIF_GetReg8((0x2400 + 0x065));
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x064))) << 8;
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x063))) << 16;
  return Temp;
}


x86 assembly (clang, -O0):
<VIM_MARB_GetThumbBufChipPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x2463,%edi
xor    %esi,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    $0x2465,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0x2464,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x2463,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_GetThumbBufChipPointer>:
push   %r14
push   %rbx
push   %rax
mov    $0x2463,%edi
xor    %esi,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    $0x2465,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,%r14
mov    $0x2464,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
shl    $0x8,%rbx
or     %r14,%rbx
mov    $0x2463,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @VIM_MARB_GetThumbBufChipPointer() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i32 @VIM_HIF_SetReg8(i32 9315, i32 0)
%3 = call i64 @VIM_HIF_GetReg8(i32 9317)
store i64 %3, i64* %1
%4 = call i64 @VIM_HIF_GetReg8(i32 9316)
%5 = shl i64 %4, 8
%6 = load i64, i64* %1
%7 = or i64 %6, %5
store i64 %7, i64* %1
%8 = call i64 @VIM_HIF_GetReg8(i32 9315)
%9 = shl i64 %8, 16
%10 = load i64, i64* %1
%11 = or i64 %10, %9
store i64 %11, i64* %1
%12 = load i64, i64* %1
ret i64 %12
}

LLVM IR (-O2):
define i64 @VIM_MARB_GetThumbBufChipPointer() {
%1 = tail call i32 @VIM_HIF_SetReg8(i32 9315, i32 0)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 9317)
%3 = tail call i64 @VIM_HIF_GetReg8(i32 9316)
%4 = shl i64 %3, 8
%5 = or i64 %4, %2
%6 = tail call i64 @VIM_HIF_GetReg8(i32 9315)
%7 = shl i64 %6, 16
%8 = or i64 %5, %7
ret i64 %8
}
int DummyCDDeInit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DummyCDDeInit() {
ret i32 0
}
/* Variables and functions */
scalar_t__ extend_stack(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int vm_alloc(int n) {
  if (extend_stack(n)) {
    fprintf(stderr, "ALLOC: stack overflow\n");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<vm_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <extend_stack@plt>
cmp    $0x0,%rax
je     115e <vm_alloc+0x3e>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1165 <vm_alloc+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vm_alloc>:
push   %rax
call   1040 <extend_stack@plt>
test   %rax,%rax
je     1147 <vm_alloc+0x27>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"ALLOC: stack overflow\0A\00"
define i32 @vm_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @extend_stack(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"ALLOC: stack overflow\0A\00"
define i32 @vm_alloc(i32 %0) {
%2 = tail call i64 @extend_stack(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %8
}
void peak_transfer_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @peak_transfer_unlock() {
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> (unsigned short)3;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] <<=
          ((state[0UL] >> (unsigned short)3) & (unsigned short)7) | 1UL;
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] & 144997984UL) & (unsigned short)59370;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1161 <RandomFunc+0x61>
movzwl -0x12(%rbp),%eax
sar    $0x3,%eax
and    $0x7,%eax
movslq %eax,%rcx
or     $0x1,%rcx
movzwl -0x12(%rbp),%eax
shl    %cl,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1127 <RandomFunc+0x27>
movzwl -0x12(%rbp),%eax
and    $0x8a47e60,%rax
and    $0xe7ea,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
shl    $0x4,%eax
and    $0x2400,%eax
or     $0x4200,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = or i64 %10, 51238316
%12 = lshr i64 %11, 3
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %37
19: ; preds = %15
%20 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%21 = load i16, i16* %20
%22 = zext i16 %21 to i32
%23 = ashr i32 %22, 3
%24 = and i32 %23, 7
%25 = sext i32 %24 to i64
%26 = or i64 %25, 1
%27 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%28 = load i16, i16* %27
%29 = zext i16 %28 to i32
%30 = trunc i64 %26 to i32
%31 = shl i32 %29, %30
%32 = trunc i32 %31 to i16
store i16 %32, i16* %27
%33 = load i16, i16* %6
%34 = zext i16 %33 to i64
%35 = add i64 %34, 2
%36 = trunc i64 %35 to i16
store i16 %36, i16* %6
br label %15
37: ; preds = %15
%38 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%39 = load i16, i16* %38
%40 = zext i16 %39 to i64
%41 = and i64 %40, 144997984
%42 = and i64 %41, 59370
%43 = trunc i64 %42 to i16
%44 = load i16*, i16** %4
%45 = getelementptr inbounds i16, i16* %44, i64 0
store i16 %43, i16* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 4
%5 = and i16 %4, 9216
%6 = or i16 %5, 16896
store i16 %6, i16* %1
ret void
}
int isrepair(card)
short card;
{ return card == 10 || card == 11 || card == 12 || card == -1; }


x86 assembly (clang, -O0):
<isrepair>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%eax
cmp    $0xffffffff,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isrepair>:
mov    %edi,%eax
shl    $0x10,%eax
and    $0xfffe,%edi
cmp    $0xa,%edi
sete   %cl
cmp    $0xc0000,%eax
sete   %dl
or     %cl,%dl
cmp    $0xffff0000,%eax
sete   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isrepair(i32 %0) {
%2 = alloca i16
%3 = trunc i32 %0 to i16
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = icmp eq i32 %5, 10
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = icmp eq i32 %9, 11
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i16, i16* %2
%13 = sext i16 %12 to i32
%14 = icmp eq i32 %13, 12
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i16, i16* %2
%17 = sext i16 %16 to i32
%18 = icmp eq i32 %17, -1
br label %19
19: ; preds = %15, %11, %7, %1
%20 = phi i1 [ true, %11 ], [ true, %7 ], [ true, %1 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @isrepair(i32 %0) {
%2 = shl i32 %0, 16
%3 = and i32 %0, 65534
%4 = icmp eq i32 %3, 10
%5 = icmp eq i32 %2, 786432
%6 = or i1 %4, %5
%7 = icmp eq i32 %2, -65536
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
void exec_two(void) {}


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

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

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

LLVM IR (-O2):
define void @exec_two() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
int main() {
  signed char wrong = 150;
  unsigned long better = 150;
  printf("wrong=%u better=%u\n", (unsigned int)wrong, (unsigned int)better);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x96,-0x5(%rbp)
movq   $0x96,-0x10(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"wrong=%u better=%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i64
store i32 0, i32* %1
store i8 -106, i8* %2
store i64 150, i64* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"wrong=%u better=%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 -106, i32 150)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Tui_Clreol(void) { printf("\x1b[K"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[K\00"
define void @Tui_Clreol() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}