xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) unsigned __int128 t102_5sub(signed char x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, (unsigned short)(5), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t102_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movsbq -0x11(%rbp),%rdx
mov    %rdx,%r9
sar    $0x3f,%r9
add    $0xfffffffffffffffb,%rdx
mov    %r9,%rcx
adc    $0xffffffffffffffff,%rcx
mov    %r9,%r8
adc    $0xffffffffffffffff,%r8
adc    $0xffffffffffffffff,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    1175 <t102_5sub+0x65>
jmp    117c <t102_5sub+0x6c>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t102_5sub>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%r14
mov    %r14,%rbx
sar    $0x3f,%rbx
add    $0xfffffffffffffffb,%r14
adc    $0xffffffffffffffff,%rbx
cmp    $0x4,%dil
jg     1133 <t102_5sub+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t102_5sub(i8 signext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i128
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i129
%7 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 %6, i129 5)
%8 = extractvalue { i129, i1 } %7, 1
%9 = extractvalue { i129, i1 } %7, 0
%10 = trunc i129 %9 to i128
%11 = zext i128 %10 to i129
%12 = icmp ne i129 %9, %11
%13 = or i1 %8, %12
store i128 %10, i128* %4
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 (...) @bar()
br label %16
16: ; preds = %14, %1
%17 = load i128, i128* %4
store i128 %17, i128* %2
%18 = bitcast i128* %2 to { i64, i64 }*
%19 = load { i64, i64 }, { i64, i64 }* %18
ret { i64, i64 } %19
}

LLVM IR (-O2):
define { i64, i64 } @t102_5sub(i8 signext %0) {
%2 = sext i8 %0 to i129
%3 = add nsw i129 %2, -5
%4 = icmp slt i8 %0, 5
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
%8 = trunc i129 %3 to i64
%9 = lshr i129 %3, 64
%10 = trunc i129 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int write(int, char *, int /*<<< orphan*/);
int write_attr(char *attr, int fd) { return write(fd, attr, strlen(attr)); }


x86 assembly (clang, -O0):
<write_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_attr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @write_attr(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 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @write(i32 %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_attr(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %1, i8* %0, i32 %3)
ret i32 %4
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)();
  int /*<<< orphan*/ sa_mask;
};
typedef int /*<<< orphan*/ sigAct;

/* Variables and functions */
int /*<<< orphan*/ memset(struct sigaction *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sigaction(int, struct sigaction *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void hdlr_enable(int sig, void (*hdlr)()) {
  struct sigaction sigAct;
  memset(&sigAct, 0, sizeof(sigAct));
  sigemptyset(&sigAct.sa_mask);
  sigAct.sa_handler = hdlr;
  sigaction(sig, &sigAct, NULL);
}


x86 assembly (clang, -O0):
<hdlr_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
add    $0x8,%rdi
call   1050 <sigemptyset@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdlr_enable>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    0x8(%rsp),%rdi
call   1050 <sigemptyset@plt>
mov    %rbx,(%rsp)
mov    %ebp,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.sigaction = type { void (...)*, i32 }
define void @hdlr_enable(i32 %0, void (...)* %1) {
%3 = alloca i32
%4 = alloca void (...)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (...)* %1, void (...)** %4
%6 = call i32 @memset(%struct.sigaction* %5, i32 0, i32 16)
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
%8 = call i32 @sigemptyset(i32* %7)
%9 = load void (...)*, void (...)** %4
%10 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (...)* %9, void (...)** %10
%11 = load i32, i32* %3
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %5, i32* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { void (...)*, i32 }
define void @hdlr_enable(i32 %0, void (...)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = call i32 @memset(%struct.sigaction* %3, i32 0, i32 16)
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
%7 = call i32 @sigemptyset(i32* %6)
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (...)* %1, void (...)** %8
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedYE1(int);
int /*<<< orphan*/ STX8(int /*<<< orphan*/);
void Op96E1(void) { STX8(DirectIndexedYE1(2)); }


x86 assembly (clang, -O0):
<Op96E1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <DirectIndexedYE1@plt>
mov    %eax,%edi
call   1030 <STX8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op96E1>:
push   %rax
mov    $0x2,%edi
call   1040 <DirectIndexedYE1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STX8@plt>

LLVM IR (-O0):
define void @Op96E1() {
%1 = call i32 @DirectIndexedYE1(i32 2)
%2 = call i32 @STX8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op96E1() {
%1 = tail call i32 @DirectIndexedYE1(i32 2)
%2 = tail call i32 @STX8(i32 %1)
ret void
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FatalErrnoError(int, int, char *);
int setrlimit(int, struct rlimit const *);
void Esetrlimit(int resource, struct rlimit const *rlim) {
  FatalErrnoError(setrlimit(resource, rlim) == -1, 1, "setrlimit()");
}


x86 assembly (clang, -O0):
<Esetrlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <setrlimit@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x1,%esi
lea    0xeae(%rip),%rdx
call   1030 <FatalErrnoError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Esetrlimit>:
push   %rax
call   1040 <setrlimit@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xeca(%rip),%rdx
mov    $0x1,%esi
pop    %rax
jmp    1030 <FatalErrnoError@plt>

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@.str = [12 x i8] c"setrlimit()\00"
define void @Esetrlimit(i32 %0, %struct.rlimit* %1) {
%3 = alloca i32
%4 = alloca %struct.rlimit*
store i32 %0, i32* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i32, i32* %3
%6 = load %struct.rlimit*, %struct.rlimit** %4
%7 = call i32 @setrlimit(i32 %5, %struct.rlimit* %6)
%8 = icmp eq i32 %7, -1
%9 = zext i1 %8 to i32
%10 = call i32 @FatalErrnoError(i32 %9, i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@.str = [12 x i8] c"setrlimit()\00"
define void @Esetrlimit(i32 %0, %struct.rlimit* %1) {
%3 = tail call i32 @setrlimit(i32 %0, %struct.rlimit* %1)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @FatalErrnoError(i32 %5, i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
double dlogistic(double x, double r) { return (r - (2.0 * r * x)); }


x86 assembly (clang, -O0):
<dlogistic>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xee5(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlogistic>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dlogistic(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %4
%7 = fmul double 2.000000e+00, %6
%8 = load double, double* %3
%9 = fneg double %7
%10 = call double @llvm.fmuladd.f64(double %9, double %8, double %5)
ret double %10
}

LLVM IR (-O2):
define double @dlogistic(double %0, double %1) {
%3 = fmul double %1, -2.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %1)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void set_interface_mtu_usage() {
  printf("Usage: set interface mtu { auto | <mtu size> } \n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"Usage: set interface mtu { auto | <mtu size> } \0A\00"
define void @set_interface_mtu_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [48 x i8] c"Usage: set interface mtu { auto | <mtu size> } \00"
define void @set_interface_mtu_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret void
}
void LZ4_compressCleanupNoStream(const struct compressionParameters *pThis) {
  (void)pThis;
}


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

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

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

LLVM IR (-O2):
%struct.compressionParameters = type opaque
define void @LZ4_compressCleanupNoStream(%struct.compressionParameters* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_min_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test31(__m64 a, __m64 b) { return _mm_min_pi16(a, b); }


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

x86 assembly (clang, -O2):
<test31>:
jmp    1030 <_mm_min_pi16@plt>

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

LLVM IR (-O2):
define i32 @test31(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_min_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int setreuid(uid_t ruid, uid_t euid) { return 0; }


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

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

LLVM IR (-O0):
define i32 @setreuid(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @setreuid(i32 %0, i32 %1) {
ret i32 0
}
int memory_addr_page(int address) {
  int page;
  if (address < 0)
    return -1;
  page = address / 512;
  return page;
}


x86 assembly (clang, -O0):
<memory_addr_page>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <memory_addr_page+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1131 <memory_addr_page+0x31>
mov    -0x8(%rbp),%eax
mov    $0x200,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_addr_page>:
test   %edi,%edi
js     1113 <memory_addr_page+0x13>
lea    0x1ff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x9,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @memory_addr_page(i32 %0) {
%2 = sdiv i32 %0, 512
%3 = icmp sgt i32 %0, -1
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
void reset(int *list, int *success, int *i) {
  for (int j = 0; j < 16; j++) {
    list[j] = -1;
  }
  *success = 0;
  *i = -1;
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    113e <reset+0x3e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <reset+0x17>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
pcmpeqd %xmm0,%xmm0
movdqu %xmm0,0x30(%rdi)
movdqu %xmm0,0x20(%rdi)
movdqu %xmm0,0x10(%rdi)
movdqu %xmm0,(%rdi)
movl   $0x0,(%rsi)
movl   $0xffffffff,(%rdx)
ret

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

LLVM IR (-O2):
define void @reset(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = bitcast i32* %0 to i8*
store i32 0, i32* %1
store i32 -1, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int say_hello(void) {
  printf("Hello World\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @say_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @say_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *doasprintf(char *, char const *, char const *);
int /*<<< orphan*/ warn(char *);
char *json_fmt_thumb_rsa(const char *exp, const char *mod) {
  char *p;
  p = doasprintf("{\"e\":\"%s\",\"kty\":\"RSA\",\"n\":\"%s\"}", exp, mod);
  if (NULL == p)
    warn("asprintf");
  return (p);
}


x86 assembly (clang, -O0):
<json_fmt_thumb_rsa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1040 <doasprintf@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1160 <json_fmt_thumb_rsa+0x40>
lea    0xec5(%rip),%rdi
call   1030 <warn@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_fmt_thumb_rsa>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1040 <doasprintf@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <json_fmt_thumb_rsa+0x27>
lea    0xede(%rip),%rdi
call   1030 <warn@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"{\22e\22:\22%s\22,\22kty\22:\22RSA\22,\22n\22:\22%s\22}\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @json_fmt_thumb_rsa(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @doasprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* null, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @warn(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [32 x i8] c"{\22e\22:\22%s\22,\22kty\22:\22RSA\22,\22n\22:\22%s\22}\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @json_fmt_thumb_rsa(i8* %0, i8* %1) {
%3 = tail call i8* @doasprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @warn(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
short check_fixed(long);
short div_fixed(short x, short y) {
  long r = ((long)x << 4) / (long)y;
  return check_fixed(r);
}


x86 assembly (clang, -O0):
<div_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rax
shl    $0x4,%rax
movswq -0x4(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <check_fixed@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_fixed>:
movslq %edi,%rdx
mov    %rdx,%rax
shl    $0x4,%rax
movslq %esi,%rcx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1133 <div_fixed+0x23>
cqto
idiv   %rcx
mov    %rax,%rdi
jmp    1030 <check_fixed@plt>
xor    %edx,%edx
div    %esi
mov    %rax,%rdi
jmp    1030 <check_fixed@plt>

LLVM IR (-O0):
define signext i16 @div_fixed(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i64
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = sext i16 %6 to i64
%8 = shl i64 %7, 4
%9 = load i16, i16* %4
%10 = sext i16 %9 to i64
%11 = sdiv i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = call signext i16 @check_fixed(i64 %12)
ret i16 %13
}

LLVM IR (-O2):
define signext i16 @div_fixed(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i64
%4 = shl nsw i64 %3, 4
%5 = sext i16 %1 to i64
%6 = sdiv i64 %4, %5
%7 = tail call signext i16 @check_fixed(i64 %6)
ret i16 %7
}
void mutex_unlock(struct mutex *m) { (void)m; }


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

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

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

LLVM IR (-O2):
%struct.mutex = type opaque
define void @mutex_unlock(%struct.mutex* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_actual_declarator();
void func_declarator() { func_actual_declarator(); }


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

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

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

LLVM IR (-O2):
define void @func_declarator() {
%1 = tail call i32 (...) @func_actual_declarator()
ret void
}
/* Type definitions */
struct SimpleNet {
  int dummy;
};

/* Variables and functions */
int selectFirstBiggest(struct SimpleNet *);
int selectFromOutput(struct SimpleNet *net) { return selectFirstBiggest(net); }


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

x86 assembly (clang, -O2):
<selectFromOutput>:
jmp    1030 <selectFirstBiggest@plt>

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

LLVM IR (-O2):
%struct.SimpleNet = type { i32 }
define i32 @selectFromOutput(%struct.SimpleNet* %0) {
%2 = tail call i32 @selectFirstBiggest(%struct.SimpleNet* %0)
ret i32 %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
int stat(const char *path, struct stat *buf) {
  int success;
  int size_path;
  success = __infer_nondet_int();
  size_path = __get_array_size(path);
  struct stat s;
  *buf = s;
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
xor    %eax,%eax
test   %ebp,%ebp
setle  %al
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.stat
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = call i32 @__get_array_size(i8* %9)
store i32 %10, i32* %6
%11 = load %struct.stat*, %struct.stat** %4
%12 = bitcast %struct.stat* %11 to i8*
%13 = bitcast %struct.stat* %7 to i8*
%14 = load i32, i32* %5
%15 = icmp sgt i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 -1
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = tail call i32 @__get_array_size(i8* %0)
%5 = icmp slt i32 %3, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ print_alphabet_x10();
int main(void) {
  print_alphabet_x10();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @print_alphabet_x10()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_alphabet_x10()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__11__IO__makeInput();
void HplAtm128SpiP__MISO__makeInput(void) {
  HplAtm128GeneralIOPinP__11__IO__makeInput();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128SpiP__MISO__makeInput() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__11__IO__makeInput()
ret void
}
/* Variables and functions */
int Add(int, int);
int /*<<< orphan*/ printf(char *, int);
void ExportA() { printf("ExportA: 2 + 5 = %d\n", Add(2, 5)); }


x86 assembly (clang, -O0):
<ExportA>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <Add@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExportA>:
push   %rax
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <Add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"ExportA: 2 + 5 = %d\0A\00"
define void @ExportA() {
%1 = tail call i32 @Add(i32 2, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int strlen(char *);
void strlen_constant2(char x) {
  char a[] = "123";
  if (strlen(a) != 3)
    (void)*(char *)0;
  a[0] = x;
  if (strlen(a) != 3)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strlen_constant2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x5(%rbp)
lea    -0x5(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     1139 <strlen_constant2+0x29>
mov    -0x1(%rbp),%al
mov    %al,-0x5(%rbp)
lea    -0x5(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     1151 <strlen_constant2+0x41>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen_constant2>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movl   $0x333231,0x4(%rsp)
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %bl,0x4(%rsp)
mov    %r14,%rdi
call   1030 <strlen@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @strlen_constant2(i8 signext %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 3355185, i32* %2
%4 = call i32 @strlen(i8* %3)
store i8 %0, i8* %3
%5 = call i32 @strlen(i8* %3)
ret void
}
void Con_Print(char *text) {}


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

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

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

LLVM IR (-O2):
define void @Con_Print(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test2(int);
void test() {
  test2(10);
  test2(20);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <test2@plt>
mov    $0x14,%edi
call   1030 <test2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0xa,%edi
call   1030 <test2@plt>
mov    $0x14,%edi
pop    %rax
jmp    1030 <test2@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 @test2(i32 10)
%2 = call i32 @test2(i32 20)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @test2(i32 10)
%2 = tail call i32 @test2(i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hdestroy1(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void hdestroy(void) { hdestroy1(NULL, NULL); }


x86 assembly (clang, -O0):
<hdestroy>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <hdestroy1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdestroy>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <hdestroy1@plt>

LLVM IR (-O0):
define void @hdestroy() {
%1 = call i32 @hdestroy1(i32* null, i32* null)
ret void
}

LLVM IR (-O2):
define void @hdestroy() {
%1 = tail call i32 @hdestroy1(i32* null, i32* null)
ret void
}
void foo540() {}


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

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

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

LLVM IR (-O2):
define void @foo540() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int);
int /*<<< orphan*/ stderr;
void *my_assert(void *ptr, const char *file, unsigned int line) {
  if (!ptr) {
    fprintf(stderr, "alloc failed, file %s, line %u\n", file, line);
    abort();
  }
  return ptr;
}


x86 assembly (clang, -O0):
<my_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1161 <my_assert+0x41>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xeab(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_assert>:
test   %rdi,%rdi
je     1129 <my_assert+0x9>
mov    %rdi,%rax
ret
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"alloc failed, file %s, line %u\0A\00"
define i8* @my_assert(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %3
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"alloc failed, file %s, line %u\0A\00"
define i8* @my_assert(i8* readnone returned %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %3
ret i8* %0
}
int problem_2(void) {
  int a = 0, b = 1, tmp, sum = 0;
  while (a < 4000000) {
    tmp = a + b;
    a = b;
    b = tmp;
    if (a % 2 == 0) {
      sum += a;
    }
  }
  return sum;
}


x86 assembly (clang, -O0):
<problem_2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3d0900,-0x4(%rbp)
jge    115d <problem_2+0x5d>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1158 <problem_2+0x58>
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <problem_2+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @problem_2() {
ret i32 4613732
}
/* Variables and functions */
int /*<<< orphan*/ screen_pintar(int, int, int, int);
void draw_map() {
  int i, j;
  for (i = 0; i < 45; i++) {
    for (j = 0; j < 80; j++) {
      screen_pintar(32, (0x7 << 4), i, j);
    }
  }
}


x86 assembly (clang, -O0):
<draw_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2d,-0x4(%rbp)
jge    1170 <draw_map+0x60>
movl   $0x0,-0x8(%rbp)
cmpl   $0x50,-0x8(%rbp)
jge    115d <draw_map+0x4d>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    $0x20,%edi
mov    $0x70,%esi
call   1030 <screen_pintar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <draw_map+0x20>
jmp    1162 <draw_map+0x52>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <draw_map+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_map>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
mov    $0x70,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1030 <screen_pintar@plt>
add    $0x1,%ebp
cmp    $0x50,%ebp
jne    1130 <draw_map+0x20>
add    $0x1,%ebx
cmp    $0x2d,%ebx
jne    1120 <draw_map+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @draw_map() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @screen_pintar(i32 32, i32 112, i32 %2, i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 80
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %1
11: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setenv(char *, char *, int);
void xlibcgo_setenv(char **arg) { setenv(arg[0], arg[1], 1); }


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

x86 assembly (clang, -O2):
<xlibcgo_setenv>:
mov    (%rdi),%rax
mov    0x8(%rdi),%rsi
mov    %rax,%rdi
mov    $0x1,%edx
jmp    1030 <setenv@plt>

LLVM IR (-O0):
define void @xlibcgo_setenv(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @setenv(i8* %5, i8* %8, i32 1)
ret void
}

LLVM IR (-O2):
define void @xlibcgo_setenv(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @setenv(i8* %2, i8* %4, i32 1)
ret void
}
/* Type definitions */
typedef int __u_char;

/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/, int);
int cbmarch_open(int f, __u_char dev, __u_char secadr) {
  int rv;
  rv = ioctl(f, _IO(0xcb, 4), (dev << 8) | secadr);
  return rv;
}


x86 assembly (clang, -O0):
<cbmarch_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0xcb,%edi
mov    $0x4,%esi
call   1030 <_IO@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
shl    $0x8,%edx
or     -0xc(%rbp),%edx
call   1040 <ioctl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_open>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    $0xcb,%edi
mov    $0x4,%esi
call   1030 <_IO@plt>
shl    $0x8,%ebp
or     %ebp,%ebx
mov    %r14d,%edi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbmarch_open(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @_IO(i32 203, i32 4)
%10 = load i32, i32* %5
%11 = shl i32 %10, 8
%12 = load i32, i32* %6
%13 = or i32 %11, %12
%14 = call i32 @ioctl(i32 %8, i32 %9, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @cbmarch_open(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_IO(i32 203, i32 4)
%5 = shl i32 %1, 8
%6 = or i32 %5, %2
%7 = tail call i32 @ioctl(i32 %0, i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fivesome_drop_work(char *, int, int);
void fivesome_drop(void) {
  fivesome_drop_work("fivesome_drop1", 0, 0);
  fivesome_drop_work("fivesome_drop2", 0, 1);
  fivesome_drop_work("fivesome_drop3", 1, 0);
  fivesome_drop_work("fivesome_drop4", 1, 1);
}


x86 assembly (clang, -O0):
<fivesome_drop>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <fivesome_drop_work@plt>
lea    0xee4(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <fivesome_drop_work@plt>
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <fivesome_drop_work@plt>
lea    0xedc(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fivesome_drop_work@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fivesome_drop>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <fivesome_drop_work@plt>
lea    0xee7(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <fivesome_drop_work@plt>
lea    0xee3(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <fivesome_drop_work@plt>
lea    0xedf(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
pop    %rax
jmp    1030 <fivesome_drop_work@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"fivesome_drop1\00"
@.str.1 = [15 x i8] c"fivesome_drop2\00"
@.str.2 = [15 x i8] c"fivesome_drop3\00"
@.str.3 = [15 x i8] c"fivesome_drop4\00"
define void @fivesome_drop() {
%1 = call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%2 = call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1)
%3 = call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 0)
%4 = call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"fivesome_drop1\00"
@.str.1 = [15 x i8] c"fivesome_drop2\00"
@.str.2 = [15 x i8] c"fivesome_drop3\00"
@.str.3 = [15 x i8] c"fivesome_drop4\00"
define void @fivesome_drop() {
%1 = tail call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%2 = tail call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1)
%3 = tail call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 0)
%4 = tail call i32 @fivesome_drop_work(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 1)
ret void
}
void ff_hevc_put_hevc_epel_h8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h8_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signal(int, void (*)(int));
void g_signal(int sig_num, void (*func)(int)) { signal(sig_num, func); }


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

x86 assembly (clang, -O2):
<g_signal>:
jmp    1030 <signal@plt>

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

LLVM IR (-O2):
define void @g_signal(i32 %0, void (i32)* %1) {
%3 = tail call i32 @signal(i32 %0, void (i32)* %1)
ret void
}
void rop3_196_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = T | stk3;
  stk1 = S & stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_196_0_0>:
mov    (%rdi),%al
not    %al
or     %dl,%al
and    %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_196_0_0(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
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = load i8*, i8** %4
store i8 %27, i8* %28
ret void
}

LLVM IR (-O2):
define void @rop3_196_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = or i8 %5, %2
%7 = and i8 %6, %1
store i8 %7, i8* %0
ret void
}
void ajUrloutExit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ajUrloutExit() {
ret void
}
unsigned int CharClass_IsLetter(char ch) {
  return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'));
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<CharClass_IsLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <CharClass_IsLetter+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <CharClass_IsLetter+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <CharClass_IsLetter+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharClass_IsLetter>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @CharClass_IsLetter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @CharClass_IsLetter(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}