xunge/DecIR huggingface dataset:
void rop3_124_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = *D | stk4;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_124_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_124_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_124_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %10
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %9
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8, i8* %6
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %5
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = load i8*, i8** %4
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = load i8, i8* %6
%55 = zext i8 %54 to i32
%56 = and i32 %53, %55
%57 = or i32 %50, %56
%58 = trunc i32 %57 to i8
%59 = load i8*, i8** %4
store i8 %58, i8* %59
ret void
}

LLVM IR (-O2):
define void @rop3_124_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void power_supply_trigger_charging_handler(struct power_supply *psy) {}


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

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

LLVM IR (-O0):
%struct.power_supply = type opaque
define void @power_supply_trigger_charging_handler(%struct.power_supply* %0) {
%2 = alloca %struct.power_supply*
store %struct.power_supply* %0, %struct.power_supply** %2
ret void
}

LLVM IR (-O2):
%struct.power_supply = type opaque
define void @power_supply_trigger_charging_handler(%struct.power_supply* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  static char *str = "Usage: "
                     "ftag"
                     " [-dpvh] MODE ARG...\n"
                     "Use '"
                     "ftag"
                     " --help' for more info\n";
  fputs(str, stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0d(%rip),%rdi
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@usage.str = internal global i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i32 0, i32 0)
@.str = [65 x i8] c"Usage: ftag [-dpvh] MODE ARG...\0AUse 'ftag --help' for more info\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i8*, i8** @usage.str
%2 = load i32, i32* @stderr
%3 = call i32 @fputs(i8* %1, i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"Usage: ftag [-dpvh] MODE ARG...\0AUse 'ftag --help' for more info\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS)
    stream = stdout;
  fprintf(stream, "Usage: %s [type: r|w] [command]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [33 x i8] c"Usage: %s [type: r|w] [command]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [33 x i8] c"Usage: %s [type: r|w] [command]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
void set_XKeyPressedEvent_type(void *_p, int _v) {
  ((XKeyPressedEvent *)_p)->type = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XKeyPressedEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int A(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  long nr_of_reductions = 1;
  ret = A(0);
  printf("RETURNED %d\n", ret);
  if (ret != A(0)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x1,-0x20(%rbp)
xor    %edi,%edi
call   1040 <A@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
xor    %edi,%edi
call   1040 <A@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    %ecx,%eax
je     1184 <main+0x64>
movl   $0x1,-0x4(%rbp)
jmp    118b <main+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <A@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <A@plt>
xor    %ecx,%ecx
cmp    %eax,%ebx
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @A(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @A(i32 0)
%6 = icmp ne i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ rdk_meta_init();
int /*<<< orphan*/ write_data_flash(unsigned char *, unsigned short,
                                    unsigned long);
void rdk_write_data_flash(unsigned char *writeBuffer, unsigned short numBytes,
                          unsigned long writeAddress) {
  rdk_meta_init();
  write_data_flash(writeBuffer, numBytes, writeAddress);
}


x86 assembly (clang, -O0):
<rdk_write_data_flash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <rdk_meta_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
movzwl %ax,%esi
call   1030 <write_data_flash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdk_write_data_flash>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <rdk_meta_init@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <write_data_flash@plt>

LLVM IR (-O0):
define void @rdk_write_data_flash(i8* %0, i16 zeroext %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i64
store i8* %0, i8** %4
store i16 %1, i16* %5
store i64 %2, i64* %6
%7 = call i32 (...) @rdk_meta_init()
%8 = load i8*, i8** %4
%9 = load i16, i16* %5
%10 = load i64, i64* %6
%11 = call i32 @write_data_flash(i8* %8, i16 zeroext %9, i64 %10)
ret void
}

LLVM IR (-O2):
define void @rdk_write_data_flash(i8* %0, i16 zeroext %1, i64 %2) {
%4 = tail call i32 (...) @rdk_meta_init()
%5 = tail call i32 @write_data_flash(i8* %0, i16 zeroext %1, i64 %2)
ret void
}
/* Variables and functions */
char *_(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int error_extra(const char *extra) {
  fprintf(stderr, _("%s: unexpected extra parameter\n"), extra);
  return 2;
}


x86 assembly (clang, -O0):
<error_extra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xec1(%rip),%rdi
call   1040 <_@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
call   1030 <fprintf@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_extra>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
lea    0xeca(%rip),%rdi
call   1040 <_@plt>
mov    %ebp,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"%s: unexpected extra parameter\0A\00"
define i32 @error_extra(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i8* @_(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* %4, i8* %5)
ret i32 2
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"%s: unexpected extra parameter\0A\00"
define i32 @error_extra(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @_(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32 %2, i8* %3, i8* %0)
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void printit(int i, char *str) { printf("%5d : '%s'\n", i, str); }


x86 assembly (clang, -O0):
<printit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printit>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"%5d : '%s'\0A\00"
define void @printit(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, d1, d2, d1old;
  d1 = 73;
  d2 = 74;
  x = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x - d1;
    d1old = d1;
    d1 = d2 + 1;
    d2 = d1old + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x49,-0xc(%rbp)
movl   $0x4a,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1167 <main+0x57>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1137 <main+0x27>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
size_t high_size_bit(int);
size_t vexists_bit_LaceKVE_joint() { return high_size_bit(1); }


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

x86 assembly (clang, -O2):
<vexists_bit_LaceKVE_joint>:
mov    $0x1,%edi
jmp    1030 <high_size_bit@plt>

LLVM IR (-O0):
define i64 @vexists_bit_LaceKVE_joint() {
%1 = call i64 @high_size_bit(i32 1)
ret i64 %1
}

LLVM IR (-O2):
define i64 @vexists_bit_LaceKVE_joint() {
%1 = tail call i64 @high_size_bit(i32 1)
ret i64 %1
}
int unix_fcntl_o_exec() { return -1; }


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

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

LLVM IR (-O0):
define i32 @unix_fcntl_o_exec() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @unix_fcntl_o_exec() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *appli) {
  printf("%s have to be started with the address and the port number of the "
         "server and the string to send\n",
         appli);
  printf("example: %s \"127.0.0.1\" 10000 \"status\"   will start a client "
         "connected on the server 127.0.0.1:10000 ans wend the string status\n",
         appli);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [97 x i8] c"%s have to be started with the address and the port number of the server and the string to send\0A\00"
@.str.1 = [129 x i8] c"example: %s \22127.0.0.1\22 10000 \22status\22 will start a client connected on the server 127.0.0.1:10000 ans wend the string status\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [97 x i8] c"%s have to be started with the address and the port number of the server and the string to send\0A\00"
@.str.1 = [129 x i8] c"example: %s \22127.0.0.1\22 10000 \22status\22 will start a client connected on the server 127.0.0.1:10000 ans wend the string status\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct evbuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ evbuffer_add_printf(struct evbuffer *, char *);
int get(struct evbuffer *ret_buf) {
  evbuffer_add_printf(ret_buf, "<!doctype html>\n<html "
                               "lang=zh>\n<head>\n\t<title>Sample</title>\n</"
                               "head>\n<body>\n</body>\n</html>\n");
  return 0;
}


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

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

LLVM IR (-O0):
%struct.evbuffer = type { i32 }
@.str = [93 x i8] c"<!doctype html>\0A<html lang=zh>\0A<head>\0A\09<title>Sample</title>\0A</head>\0A<body>\0A</body>\0A</html>\0A\00"
define i32 @get(%struct.evbuffer* %0) {
%2 = alloca %struct.evbuffer*
store %struct.evbuffer* %0, %struct.evbuffer** %2
%3 = load %struct.evbuffer*, %struct.evbuffer** %2
%4 = call i32 @evbuffer_add_printf(%struct.evbuffer* %3, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.evbuffer = type { i32 }
@.str = [93 x i8] c"<!doctype html>\0A<html lang=zh>\0A<head>\0A\09<title>Sample</title>\0A</head>\0A<body>\0A</body>\0A</html>\0A\00"
define i32 @get(%struct.evbuffer* %0) {
%2 = tail call i32 @evbuffer_add_printf(%struct.evbuffer* %0, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int pow(double, double);
float IEEE11073_to_float(uint32_t mantissa, char exponent) {
  return (float)(mantissa * pow(10.0, (double)exponent));
}


x86 assembly (clang, -O0):
<IEEE11073_to_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xec9(%rip),%xmm0
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IEEE11073_to_float>:
push   %rbx
mov    %edi,%ebx
cvtsi2sd %esi,%xmm1
movsd  0xee1(%rip),%xmm0
call   1030 <pow@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @IEEE11073_to_float(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = sitofp i8 %6 to double
%8 = call i32 @pow(double 1.000000e+01, double %7)
%9 = mul nsw i32 %5, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @IEEE11073_to_float(i32 %0, i8 signext %1) {
%3 = sitofp i8 %1 to double
%4 = tail call i32 @pow(double 1.000000e+01, double %3)
%5 = mul nsw i32 %4, %0
%6 = sitofp i32 %5 to float
ret float %6
}
char last(char *s) {
  while (*s++)
    ;
  return (s[-2]);
}


x86 assembly (clang, -O0):
<last>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1125 <last+0x25>
jmp    1108 <last+0x8>
mov    -0x8(%rbp),%rax
movsbl -0x2(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<last>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <last>
mov    -0x2(%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @last(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %2
%6 = load i8, i8* %4
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 -2
%12 = load i8, i8* %11
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @last(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 -1
%9 = load i8, i8* %8
ret i8 %9
}
wrs(s) register char *s;
{ write(2, s, strlen(s)); }


x86 assembly (clang, -O0):
<wrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrs>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @wrs(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %4, i64 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @wrs(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %0, i64 %2)
ret i32 undef
}
float generate_nan() {
  static int nan_raw = 0x7FBFFFFF;
  return *(float *)&nan_raw;
}


x86 assembly (clang, -O0):
<generate_nan>:
push   %rbp
mov    %rsp,%rbp
movss  0x2f14(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
@generate_nan.nan_raw = internal global i32 2143289343
define float @generate_nan() {
%1 = load float, float* bitcast (i32* @generate_nan.nan_raw to float*)
ret float %1
}

LLVM IR (-O2):
define float @generate_nan() {
ret float 0x7FF7FFFFE0000000
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ check_T1(int /*<<< orphan*/ *);
int /*<<< orphan*/ check_V(int /*<<< orphan*/ *);
int check_T(FILE *src) {
  if (!check_V(src)) {
    return 0;
  }
  if (!check_T1(src)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<check_T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <check_V@plt>
cmp    $0x0,%eax
jne    114a <check_T+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    116f <check_T+0x4f>
mov    -0x10(%rbp),%rdi
call   1030 <check_T1@plt>
cmp    $0x0,%eax
jne    1168 <check_T+0x48>
movl   $0x0,-0x4(%rbp)
jmp    116f <check_T+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_T>:
push   %rbx
mov    %rdi,%rbx
call   1040 <check_V@plt>
test   %eax,%eax
je     1140 <check_T+0x20>
mov    %rbx,%rdi
call   1030 <check_T1@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_T(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = call i32 @check_V(i32* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %14
8: ; preds = %1
%9 = load i32*, i32** %3
%10 = call i32 @check_T1(i32* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 0, i32* %2
br label %14
13: ; preds = %8
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @check_T(i32* %0) {
%2 = tail call i32 @check_V(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @check_T1(i32* %0)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ netSleep(int);
int netWrite(int, char *, int);
int /*<<< orphan*/ printf(char *, int);
void writeTest(int socket) {
  int sent = netWrite(socket, "test", 4);
  printf("sent: %i\n", sent);
  netSleep(1000);
}


x86 assembly (clang, -O0):
<writeTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xebb(%rip),%rsi
mov    $0x4,%edx
call   1050 <netWrite@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3e8,%edi
call   1030 <netSleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeTest>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x4,%edx
call   1050 <netWrite@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3e8,%edi
pop    %rax
jmp    1030 <netSleep@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [10 x i8] c"sent: %i\0A\00"
define void @writeTest(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @netWrite(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @netSleep(i32 1000)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [10 x i8] c"sent: %i\0A\00"
define void @writeTest(i32 %0) {
%2 = tail call i32 @netWrite(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 @netSleep(i32 1000)
ret void
}
/* Variables and functions */
void *__memset(void *, int, size_t);
void *memset(void *dst, int c, size_t n) { return __memset(dst, c, n); }


x86 assembly (clang, -O0):
<memset>:
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 <__memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset>:
jmp    1030 <__memset@plt>

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

LLVM IR (-O2):
define i8* @memset(i8* %0, i32 %1, i64 %2) {
%4 = tail call i8* @__memset(i8* %0, i32 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int htonl(int);
int /*<<< orphan*/ write(int, int *, int);
void write_int(int fd, int val) {
  val = htonl(val);
  write(fd, &val, sizeof val);
}


x86 assembly (clang, -O0):
<write_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_int>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @write_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @htonl(i32 %1)
store i32 %4, i32* %3
%5 = call i32 @write(i32 %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn1();
int fn2(void) {
  fn1();
  return 0;
}


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

x86 assembly (clang, -O2):
<fn2>:
push   %rax
xor    %eax,%eax
call   1030 <fn1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn2() {
%1 = call i32 (...) @fn1()
ret i32 0
}

LLVM IR (-O2):
define i32 @fn2() {
%1 = tail call i32 (...) @fn1()
ret i32 0
}
void native_window_create_screen_select() {}


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

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

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

LLVM IR (-O2):
define void @native_window_create_screen_select() {
ret void
}
char get_char(int x, int y, char *buffer) {
  if (x >= 0 && x < 80 && y >= 0 && y < 24)
    return buffer[x + y * 80];
  else
    return ' ';
}


x86 assembly (clang, -O0):
<get_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1151 <get_char+0x51>
cmpl   $0x50,-0x8(%rbp)
jge    1151 <get_char+0x51>
cmpl   $0x0,-0xc(%rbp)
jl     1151 <get_char+0x51>
cmpl   $0x18,-0xc(%rbp)
jge    1151 <get_char+0x51>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   $0x50,-0xc(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
jmp    1155 <get_char+0x55>
movb   $0x20,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char>:
mov    $0x20,%al
cmp    $0x4f,%edi
ja     111a <get_char+0x1a>
cmp    $0x17,%esi
ja     111a <get_char+0x1a>
shl    $0x4,%esi
lea    (%rsi,%rsi,4),%eax
mov    %edi,%ecx
add    %rax,%rcx
mov    (%rdx,%rcx,1),%al
ret

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

LLVM IR (-O2):
define signext i8 @get_char(i32 %0, i32 %1, i8* nocapture %2) {
%4 = icmp ult i32 %0, 80
%5 = icmp ult i32 %1, 24
%6 = and i1 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = mul nuw nsw i32 %1, 80
%9 = add nuw nsw i32 %8, %0
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %2, i64 %10
%12 = load i8, i8* %11
br label %13
13: ; preds = %3, %7
%14 = phi i8 [ %12, %7 ], [ 32, %3 ]
ret i8 %14
}
/* Variables and functions */
int /*<<< orphan*/ getEnvInt(char *, int);
void SteamAPI_RunCallbacks(void) {
  if (!getEnvInt("STEAM_API_RUN_CALLBACKS", 1))
    return;
}


x86 assembly (clang, -O0):
<SteamAPI_RunCallbacks>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <getEnvInt@plt>
cmp    $0x0,%eax
jne    1133 <SteamAPI_RunCallbacks+0x23>
jmp    1133 <SteamAPI_RunCallbacks+0x23>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"STEAM_API_RUN_CALLBACKS\00"
define void @SteamAPI_RunCallbacks() {
%1 = call i32 @getEnvInt(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %4
4: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"STEAM_API_RUN_CALLBACKS\00"
define void @SteamAPI_RunCallbacks() {
%1 = tail call i32 @getEnvInt(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void my_version(void) {
  printf(("%s (%s) %s\n"
          "%s\n"),
         "udp-server", ":-|", "", "");
  return;
}


x86 assembly (clang, -O0):
<my_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xef1(%rip),%rdx
lea    0xede(%rip),%r8
mov    %r8,%rcx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_version>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
lea    0xef5(%rip),%rdx
lea    0xee2(%rip),%rcx
mov    %rcx,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s (%s) %s\0A%s\0A\00"
@.str.1 = [11 x i8] c"udp-server\00"
@.str.2 = [4 x i8] c":-|\00"
@.str.3 = [1 x i8] zeroinitializer
define void @my_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s (%s) %s\0A%s\0A\00"
@.str.1 = [11 x i8] c"udp-server\00"
@.str.2 = [4 x i8] c":-|\00"
@.str.3 = [1 x i8] zeroinitializer
define void @my_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct SoundIoOutStream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void underflow_cb(struct SoundIoOutStream *out) {
  fprintf(stderr, "underflow\n");
}


x86 assembly (clang, -O0):
<underflow_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<underflow_cb>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.SoundIoOutStream = type { i32 }
@stderr = global i32 0
@.str = [11 x i8] c"underflow\0A\00"
define void @underflow_cb(%struct.SoundIoOutStream* %0) {
%2 = alloca %struct.SoundIoOutStream*
store %struct.SoundIoOutStream* %0, %struct.SoundIoOutStream** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.SoundIoOutStream = type { i32 }
@stderr = global i32 0
@.str = [11 x i8] c"underflow\0A\00"
define void @underflow_cb(%struct.SoundIoOutStream* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int inter_mapif_init(int);
int char_mapif_init(int fd) { return inter_mapif_init(fd); }


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

x86 assembly (clang, -O2):
<char_mapif_init>:
jmp    1030 <inter_mapif_init@plt>

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

LLVM IR (-O2):
define i32 @char_mapif_init(i32 %0) {
%2 = tail call i32 @inter_mapif_init(i32 %0)
ret i32 %2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
scalar_t__ malloc(int);
char *__VERIFIER_nondet_String(void) {
  int length = __VERIFIER_nondet_int();
  if (length < 1) {
    length = 1;
  }
  char *nondetString = (char *)malloc(length * sizeof(char));
  nondetString[length - 1] = '\0';
  return nondetString;
}


x86 assembly (clang, -O0):
<__VERIFIER_nondet_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    1143 <__VERIFIER_nondet_String+0x23>
movl   $0x1,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_nondet_String>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0x1,%ebx
cmovg  %eax,%ebx
mov    %ebx,%edi
call   1040 <malloc@plt>
add    $0xffffffff,%ebx
movb   $0x0,(%rax,%rbx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__VERIFIER_nondet_String() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 1
%3 = select i1 %2, i32 %1, i32 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = add nsw i32 %3, -1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int solve();
int main() { printf("%d\n", solve()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <solve@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

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

/* Variables and functions */
int syscall(int, char const *, struct stat *);
int lstat(const char *path, struct stat *buf) {
  return syscall(196, path, buf);
}


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

x86 assembly (clang, -O2):
<lstat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xc4,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @lstat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @syscall(i32 196, i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @lstat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @syscall(i32 196, i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ end_game();
int /*<<< orphan*/ mvaddstr(int, int, char *);
void you_won() {
  mvaddstr(24 / 2, 48 / 2, " YOU HAVE WON! :) ");
  end_game();
}


x86 assembly (clang, -O0):
<you_won>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x18,%esi
lea    0xecb(%rip),%rdx
call   1030 <mvaddstr@plt>
mov    $0x0,%al
call   1040 <end_game@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<you_won>:
push   %rax
lea    0xed8(%rip),%rdx
mov    $0xc,%edi
mov    $0x18,%esi
call   1030 <mvaddstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <end_game@plt>

LLVM IR (-O0):
@.str = [19 x i8] c" YOU HAVE WON! :) \00"
define void @you_won() {
%1 = call i32 @mvaddstr(i32 12, i32 24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @end_game()
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c" YOU HAVE WON! :) \00"
define void @you_won() {
%1 = tail call i32 @mvaddstr(i32 12, i32 24, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @end_game()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ area4();
int main18() {
  area4();
  return 0;
}


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

x86 assembly (clang, -O2):
<main18>:
push   %rax
xor    %eax,%eax
call   1030 <area4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main18() {
%1 = call i32 (...) @area4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main18() {
%1 = tail call i32 (...) @area4()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushinteger4array(int *x, int n) {
  pushNarray((char *)x, (unsigned int)(n * 4));
}


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

x86 assembly (clang, -O2):
<pushinteger4array>:
shl    $0x2,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushinteger4array(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 = bitcast i32* %5 to i8*
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 4
%9 = call i32 @pushNarray(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushinteger4array(i32* %0, i32 %1) {
%3 = bitcast i32* %0 to i8*
%4 = shl nsw i32 %1, 2
%5 = tail call i32 @pushNarray(i8* %3, i32 %4)
ret void
}