xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fake_free(void *);
void *fake_malloc(int);
int main(int argc, char *argv[]) {
  void *pointer4 = 0;
  pointer4 = fake_malloc(50);
  fake_free(pointer4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x32,%edi
call   1030 <fake_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fake_free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%7 = call i8* @fake_malloc(i32 50)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @fake_free(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @fake_malloc(i32 50)
%4 = tail call i32 @fake_free(i8* %3)
ret i32 0
}
/* Variables and functions */
float sqrt(float);
float futhark_sqrt32(float x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<futhark_sqrt32>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <futhark_sqrt32+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define float @futhark_sqrt32(float %0) {
%2 = tail call float @sqrt(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printClub(int);
int /*<<< orphan*/ printDiamond(int);
int /*<<< orphan*/ printHeart(int);
int /*<<< orphan*/ printSpade(int);
void determineSuit(char suit, int line) {
  switch (suit) {
  case 's':
    printSpade(line);
    break;
  case 'd':
    printDiamond(line);
    break;
  case 'h':
    printHeart(line);
    break;
  case 'c':
    printClub(line);
    break;
  }
}


x86 assembly (clang, -O0):
<determineSuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x10,%eax
ja     11aa <determineSuit+0x6a>
mov    -0x10(%rbp),%rax
lea    0xe8e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
call   1030 <printSpade@plt>
jmp    11aa <determineSuit+0x6a>
mov    -0x8(%rbp),%edi
call   1040 <printDiamond@plt>
jmp    11aa <determineSuit+0x6a>
mov    -0x8(%rbp),%edi
call   1050 <printHeart@plt>
jmp    11aa <determineSuit+0x6a>
mov    -0x8(%rbp),%edi
call   1060 <printClub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determineSuit>:
add    $0xffffff9d,%edi
cmp    $0x10,%edi
ja     1166 <determineSuit+0x26>
lea    0xeb1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    %esi,%edi
jmp    1060 <printClub@plt>
mov    %esi,%edi
jmp    1040 <printDiamond@plt>
ret
mov    %esi,%edi
jmp    1050 <printHeart@plt>
mov    %esi,%edi
jmp    1030 <printSpade@plt>

LLVM IR (-O0):
define void @determineSuit(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
switch i32 %6, label %19 [
i32 115, label %7
i32 100, label %10
i32 104, label %13
i32 99, label %16
]
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @printSpade(i32 %8)
br label %19
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 @printDiamond(i32 %11)
br label %19
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @printHeart(i32 %14)
br label %19
16: ; preds = %2
%17 = load i32, i32* %4
%18 = call i32 @printClub(i32 %17)
br label %19
19: ; preds = %2, %16, %13, %10, %7
ret void
}

LLVM IR (-O2):
define void @determineSuit(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
switch i32 %3, label %12 [
i32 115, label %4
i32 100, label %6
i32 104, label %8
i32 99, label %10
]
4: ; preds = %2
%5 = tail call i32 @printSpade(i32 %1)
br label %12
6: ; preds = %2
%7 = tail call i32 @printDiamond(i32 %1)
br label %12
8: ; preds = %2
%9 = tail call i32 @printHeart(i32 %1)
br label %12
10: ; preds = %2
%11 = tail call i32 @printClub(i32 %1)
br label %12
12: ; preds = %2, %10, %8, %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core7_swap(char *, int);
void U_EMRSETVIEWPORTORGEX_swap(char *record, int torev) {
  core7_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRSETVIEWPORTORGEX_swap>:
jmp    1030 <core7_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSETVIEWPORTORGEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core7_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct udphdr {
  int dummy;
};

/* Variables and functions */
size_t udp_get_header_size(const uint8_t *udp_segment) {
  return sizeof(struct udphdr);
}


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

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

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

LLVM IR (-O2):
define i64 @udp_get_header_size(i32* nocapture readnone %0) {
ret i64 4
}
void glCopyTexImage2D(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glCopyTexImage2D() {
ret void
}
void outb(unsigned short port, unsigned char value) {
  __asm__ __volatile__("outb %0, %1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int b();
int c() { return b() + 42; }


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <b@plt>
add    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rax
xor    %eax,%eax
call   1030 <b@plt>
add    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @c() {
%1 = call i32 (...) @b()
%2 = add nsw i32 %1, 42
ret i32 %2
}

LLVM IR (-O2):
define i32 @c() {
%1 = tail call i32 (...) @b()
%2 = add nsw i32 %1, 42
ret i32 %2
}
void test___atomic_fetch_or_1(short *mem) { __atomic_fetch_or(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_or_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
or     %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test___atomic_fetch_or_1+0x5d>
jmp    1125 <test___atomic_fetch_or_1+0x25>
mov    -0x1a(%rbp),%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_or_1>:
lock orw $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_fetch_or_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw or i16* %5, i16 %6 acq_rel
store i16 %7, i16* %4
%8 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_or_1(i16* nocapture %0) {
%2 = atomicrmw or i16* %0, i16 1 acq_rel
ret void
}
void EC_GFp_nist_method(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GFp_nist_method() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt02(void) {
  SendInterrupt(0x52, 0x7, 0x8000, 0x00040000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt02>:
push   %rbp
mov    %rsp,%rbp
mov    $0x52,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x40000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt02>:
mov    $0x52,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x40000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt02() {
%1 = call i32 @SendInterrupt(i32 82, i32 7, i32 32768, i32 262144)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt02() {
%1 = tail call i32 @SendInterrupt(i32 82, i32 7, i32 32768, i32 262144)
ret void
}
safety(card) register short card;
{
  switch (card) {
  case 5:
  case 10:
  case 15:
    return 15;
  case 6:
  case 11:
  case 16:
    return 16;
  case 7:
  case 12:
  case 17:
    return 17;
  case 13:
  case 8:
  case 18:
  case 9:
  case 14:
    return 18;
  }
}


x86 assembly (clang, -O0):
<safety>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xd,%eax
ja     1160 <safety+0x60>
mov    -0x10(%rbp),%rax
lea    0xed4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xf,-0x4(%rbp)
jmp    1160 <safety+0x60>
movl   $0x10,-0x4(%rbp)
jmp    1160 <safety+0x60>
movl   $0x11,-0x4(%rbp)
jmp    1160 <safety+0x60>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safety>:
movswl %di,%ecx
add    $0xfffffffa,%ecx
mov    $0xf,%eax
cmp    $0xc,%ecx
ja     111d <safety+0x1d>
movslq %ecx,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.safety = [13 x i32] [i32 16, i32 17, i32 18, i32 18, i32 15, i32 16, i32 17, i32 18, i32 18, i32 15, i32 16, i32 17, i32 18]
define i32 @safety(i32 %0) {
%2 = shl i32 %0, 16
%3 = ashr exact i32 %2, 16
%4 = add nsw i32 %3, -6
%5 = icmp ult i32 %4, 13
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [13 x i32], [13 x i32]* @switch.table.safety, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 15, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int power2(int);
int power3(int x) { return power2(x) * x; }


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

x86 assembly (clang, -O2):
<power3>:
push   %rbx
mov    %edi,%ebx
call   1030 <power2@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @power3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @power2(i32 %3)
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @power3(i32 %0) {
%2 = tail call i32 @power2(i32 %0)
%3 = mul nsw i32 %2, %0
ret i32 %3
}
void module_put(struct module *module) {}


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

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

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

LLVM IR (-O2):
%struct.module = type opaque
define void @module_put(%struct.module* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ BigEndianReadU16(int /*<<< orphan*/ const *);
int16_t BigEndianReadS16(const uint8_t *bytes) {
  union {
    int16_t s16;
    uint16_t u16;
  } u;
  u.u16 = BigEndianReadU16(bytes);
  return u.s16;
}


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

x86 assembly (clang, -O2):
<BigEndianReadS16>:
jmp    1030 <BigEndianReadU16@plt>

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @BigEndianReadS16(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @BigEndianReadU16(i32* %4)
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to i32*
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @BigEndianReadS16(i32* %0) {
%2 = tail call i32 @BigEndianReadU16(i32* %0)
ret i32 %2
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ sscanf(char const *, char *, int *);
int cgi_content_length(void) {
  const char *len_env;
  int len = 0;
  len_env = getenv("CONTENT_LENGTH");
  if (!len_env)
    return (0);
  sscanf(len_env, " %d ", &len);
  return (len);
}


x86 assembly (clang, -O0):
<cgi_content_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x14(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <cgi_content_length+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1170 <cgi_content_length+0x50>
mov    -0x10(%rbp),%rdi
lea    0xeae(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgi_content_length>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1154 <cgi_content_length+0x34>
lea    0xece(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rax,%rdi
call   1040 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"CONTENT_LENGTH\00"
@.str.1 = [5 x i8] c" %d \00"
define i32 @cgi_content_length() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ %7, %5 ], [ 0, %0 ]
ret i32 %9
}
void CreNumInBuf(buf_, n) char *buf_;
int n;
{ sprintf(buf_ + strlen(buf_), "%d", n); }


x86 assembly (clang, -O0):
<CreNumInBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
mov    -0xc(%rbp),%edx
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @CreNumInBuf(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int is_point_in_segment(int point, int s1, int s2) {
  if (s1 < s2) {
    return point >= s1 && point <= s2;
  } else {
    return point >= s2 && point <= s1;
  }
}


x86 assembly (clang, -O0):
<is_point_in_segment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1146 <is_point_in_segment+0x46>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     1136 <is_point_in_segment+0x36>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <is_point_in_segment+0x6e>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x12(%rbp)
jl     1163 <is_point_in_segment+0x63>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_point_in_segment>:
xor    %eax,%eax
xor    %r8d,%r8d
cmp    %esi,%edi
setle  %al
setge  %r8b
xor    %ecx,%ecx
xor    %r9d,%r9d
cmp    %edx,%edi
setge  %cl
setle  %r9b
cmp    %edx,%esi
cmovl  %r9d,%ecx
cmovl  %r8d,%eax
and    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_point_in_segment(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %7
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i32, i32* %5
%17 = load i32, i32* %7
%18 = icmp sle i32 %16, %17
br label %19
19: ; preds = %15, %11
%20 = phi i1 [ false, %11 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
store i32 %21, i32* %4
br label %33
22: ; preds = %3
%23 = load i32, i32* %5
%24 = load i32, i32* %7
%25 = icmp sge i32 %23, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i32, i32* %5
%28 = load i32, i32* %6
%29 = icmp sle i32 %27, %28
br label %30
30: ; preds = %26, %22
%31 = phi i1 [ false, %22 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
store i32 %32, i32* %4
br label %33
33: ; preds = %30, %19
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @is_point_in_segment(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
%5 = icmp sge i32 %0, %2
%6 = icmp sle i32 %0, %1
%7 = icmp sge i32 %0, %1
%8 = icmp sle i32 %0, %2
%9 = select i1 %4, i1 %8, i1 %5
%10 = select i1 %4, i1 %7, i1 %6
%11 = and i1 %10, %9
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void esc(char *p) {
  for (; *p; p++) {
    if (*p == '\\' || *p == '\"')
      printf("\\");
    putchar(*p);
  }
}


x86 assembly (clang, -O0):
<esc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1182 <esc+0x62>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1159 <esc+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1165 <esc+0x45>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <esc+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esc>:
push   %rbx
mov    %rdi,%rbx
jmp    1139 <esc+0x29>
cs nopw 0x0(%rax,%rax,1)
mov    $0x5c,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x22,%al
je     1120 <esc+0x10>
cmp    $0x5c,%al
je     1120 <esc+0x10>
test   %al,%al
jne    112d <esc+0x1d>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @esc(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %11, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 0, label %12
i8 92, label %5
i8 34, label %5
]
5: ; preds = %2, %2
%6 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 92)
%7 = load i8, i8* %3
br label %8
8: ; preds = %2, %5
%9 = phi i8 [ %4, %2 ], [ %7, %5 ]
%10 = tail call i32 @putchar(i8 signext %9)
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %2
ret void
}
char *fixname(s)
char *s;
{ return s; }


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

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

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

LLVM IR (-O2):
define i8* @fixname(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int free_outmem(char **out) {
  if (*out == NULL) {
    return -1;
  }
  free(*out);
  return 0;
}


x86 assembly (clang, -O0):
<free_outmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1136 <free_outmem+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1149 <free_outmem+0x39>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_outmem>:
push   %rax
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1122 <free_outmem+0x12>
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @free_outmem(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int pow(int, int);
int /*<<< orphan*/ printf(char *, unsigned long);
int main(void) {
  unsigned long num = (16 * pow(10, 3) * 500) - 1;
  printf("%d\n", num);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
shl    $0x4,%eax
imul   $0x1f4,%eax,%eax
sub    $0x1,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x3,%esi
call   1040 <pow@plt>
imul   $0x1f40,%eax,%eax
add    $0xffffffff,%eax
movslq %eax,%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = call i32 @pow(i32 10, i32 3)
%3 = mul nsw i32 16, %2
%4 = mul nsw i32 %3, 500
%5 = sub nsw i32 %4, 1
%6 = sext i32 %5 to i64
store i64 %6, i64* %1
%7 = load i64, i64* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @pow(i32 10, i32 3)
%2 = mul nsw i32 %1, 8000
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ nl_item;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
char *nl_langinfo(int /*<<< orphan*/);
char *nl_langinfo_l(nl_item item, locale_t l) { return nl_langinfo(item); }


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

x86 assembly (clang, -O2):
<nl_langinfo_l>:
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
define i8* @nl_langinfo_l(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 = call i8* @nl_langinfo(i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @nl_langinfo_l(i32 %0, i32 %1) {
%3 = tail call i8* @nl_langinfo(i32 %0)
ret i8* %3
}
int cdiEncodeParam(int pnum, int pcat, int pdis) {
  unsigned uparam, upnum;
  if (pcat < 0 || pcat > 255)
    pcat = 255;
  if (pdis < 0 || pdis > 255)
    pdis = 255;
  upnum = (unsigned)pnum;
  if (pnum < 0)
    upnum = (unsigned)(0x8000 - pnum);
  uparam = upnum << 16 | (unsigned)(pcat << 8) | (unsigned)pdis;
  return ((int)uparam);
}


x86 assembly (clang, -O0):
<cdiEncodeParam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1124 <cdiEncodeParam+0x24>
cmpl   $0xff,-0x8(%rbp)
jle    112b <cdiEncodeParam+0x2b>
movl   $0xff,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1142 <cdiEncodeParam+0x42>
cmpl   $0xff,-0xc(%rbp)
jle    1149 <cdiEncodeParam+0x49>
movl   $0xff,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1164 <cdiEncodeParam+0x64>
mov    $0x8000,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdiEncodeParam>:
mov    $0x8000,%ecx
sub    %edi,%ecx
test   %edi,%edi
cmovns %edi,%ecx
cmp    $0xff,%edx
mov    $0xff,%eax
cmovae %eax,%edx
cmp    $0xff,%esi
cmovb  %esi,%eax
shl    $0x10,%ecx
shl    $0x8,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cdiEncodeParam(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32, i32* %5
%13 = icmp sgt i32 %12, 255
br i1 %13, label %14, label %15
14: ; preds = %11, %3
store i32 255, i32* %5
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = icmp sgt i32 %19, 255
br i1 %20, label %21, label %22
21: ; preds = %18, %15
store i32 255, i32* %6
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %4
store i32 %23, i32* %8
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* %4
%28 = sub nsw i32 32768, %27
store i32 %28, i32* %8
br label %29
29: ; preds = %26, %22
%30 = load i32, i32* %8
%31 = shl i32 %30, 16
%32 = load i32, i32* %5
%33 = shl i32 %32, 8
%34 = or i32 %31, %33
%35 = load i32, i32* %6
%36 = or i32 %34, %35
store i32 %36, i32* %7
%37 = load i32, i32* %7
ret i32 %37
}

LLVM IR (-O2):
define i32 @cdiEncodeParam(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, 0
%5 = sub nsw i32 32768, %0
%6 = select i1 %4, i32 %5, i32 %0
%7 = icmp ult i32 %2, 255
%8 = select i1 %7, i32 %2, i32 255
%9 = icmp ult i32 %1, 255
%10 = select i1 %9, i32 %1, i32 255
%11 = shl i32 %6, 16
%12 = shl nuw nsw i32 %10, 8
%13 = or i32 %12, %11
%14 = or i32 %13, %8
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int check_any(const uint64_t value, const uint64_t check_value_data) {
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @check_any(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printDigit(char inte) {
  if (inte == '.')
    printf(".");
  else
    printf("%d", inte);
}


x86 assembly (clang, -O0):
<printDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
jne    113e <printDigit+0x2e>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1150 <printDigit+0x40>
movsbl -0x1(%rbp),%esi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDigit>:
cmp    $0x2e,%dil
jne    1130 <printDigit+0x10>
mov    $0x2e,%edi
jmp    1030 <putchar@plt>
movsbl %dil,%esi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
define void @printDigit(i8 signext %0) {
%2 = icmp eq i8 %0, 46
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @putchar(i32 46)
br label %8
5: ; preds = %1
%6 = sext i8 %0 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
void voice_chat_setup_threads(void) {}


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

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

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

LLVM IR (-O2):
define void @voice_chat_setup_threads() {
ret void
}
void set_speed() {}


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

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

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

LLVM IR (-O2):
define void @set_speed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xc8() {
  Assert_real((isalnum(200) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1005, ("isalnum should be 0 for 0xc8"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xc8>:
push   %rax
mov    $0xc8,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3ed,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc8\00"
define void @t_isalnum_0xc8() {
%1 = call i64 @isalnum(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc8\00"
define void @t_isalnum_0xc8() {
%1 = tail call i64 @isalnum(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void hw_sound_init() {}


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

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

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

LLVM IR (-O2):
define void @hw_sound_init() {
ret void
}
/* Variables and functions */
char getchar();
char toupper(char);
char GetCaractere() {
  char caractere = 0;
  caractere = getchar();
  caractere = toupper(caractere);
  while (getchar() != '\n')
    ;
  return caractere;
}


x86 assembly (clang, -O0):
<GetCaractere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     115a <GetCaractere+0x3a>
jmp    1142 <GetCaractere+0x22>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCaractere>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    1140 <GetCaractere+0x20>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @GetCaractere() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = call signext i8 @toupper(i8 signext %3)
store i8 %4, i8* %1
br label %5
5: ; preds = %9, %0
%6 = call signext i8 (...) @getchar()
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i8, i8* %1
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @GetCaractere() {
%1 = tail call signext i8 (...) @getchar()
%2 = tail call signext i8 @toupper(i8 signext %1)
br label %3
3: ; preds = %3, %0
%4 = tail call signext i8 (...) @getchar()
%5 = icmp eq i8 %4, 10
br i1 %5, label %6, label %3
6: ; preds = %3
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ drawBmpfile(int /*<<< orphan*/, int, char *);
int /*<<< orphan*/ sleep(int);
void happyFace() {
  drawBmpfile(0, 127, "Big smile");
  sleep(2000);
}


x86 assembly (clang, -O0):
<happyFace>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x7f,%esi
lea    0xece(%rip),%rdx
call   1030 <drawBmpfile@plt>
mov    $0x7d0,%edi
call   1040 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<happyFace>:
push   %rax
lea    0xed8(%rip),%rdx
xor    %edi,%edi
mov    $0x7f,%esi
call   1030 <drawBmpfile@plt>
mov    $0x7d0,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Big smile\00"
define void @happyFace() {
%1 = call i32 @drawBmpfile(i32 0, i32 127, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @sleep(i32 2000)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Big smile\00"
define void @happyFace() {
%1 = tail call i32 @drawBmpfile(i32 0, i32 127, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 2000)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int mpeg3_mmx_test() {
  int result = 0;
  FILE *proc;
  char string[1024];
  return 0;
}


x86 assembly (clang, -O0):
<mpeg3_mmx_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x390,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
add    $0x390,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mpeg3_mmx_test() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [1024 x i8]
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @mpeg3_mmx_test() {
ret i32 0
}
void set_numa_mem(int node) {}


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

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

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

LLVM IR (-O2):
define void @set_numa_mem(i32 %0) {
ret void
}
void NETSCAPE_SPKI_new(void) {}


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

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

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

LLVM IR (-O2):
define void @NETSCAPE_SPKI_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int keys_setupInput() {
  cbreak();
  return 1;
}


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

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

LLVM IR (-O0):
define i32 @keys_setupInput() {
%1 = call i32 (...) @cbreak()
ret i32 1
}

LLVM IR (-O2):
define i32 @keys_setupInput() {
%1 = tail call i32 (...) @cbreak()
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Widget;
typedef int /*<<< orphan*/ String;
typedef int /*<<< orphan*/ Cardinal;

/* Variables and functions */
int /*<<< orphan*/ ringbell();
void bell(Widget w, XEvent *ev, String *vector, Cardinal *count) { ringbell(); }


x86 assembly (clang, -O0):
<bell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <ringbell@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bell(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = call i32 (...) @ringbell()
ret void
}

LLVM IR (-O2):
define void @bell(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
%5 = tail call i32 (...) @ringbell()
ret void
}
unsigned int inl(unsigned short port) {
  unsigned int val;
  asm volatile("inl %w1, %0" : "=a"(val) : "Nd"(port));
  return val;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @inl(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ WriteUint32Be(int /*<<< orphan*/, void *);
int32_t WriteInt32Be(int32_t value, void *out) {
  return WriteUint32Be((uint32_t)value, out);
}


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

x86 assembly (clang, -O2):
<WriteInt32Be>:
jmp    1030 <WriteUint32Be@plt>

LLVM IR (-O0):
define i64 @WriteInt32Be(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i8*, i8** %4
%8 = call i64 @WriteUint32Be(i32 %6, i8* %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @WriteInt32Be(i64 %0, i8* %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i64 @WriteUint32Be(i32 %3, i8* %1)
ret i64 %4
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_int16_t(int16_t const k1, int16_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_int16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_int16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_int16_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_int16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int main() {
  int a, b, c;
  a = 1;
  b = 2;
  c = 3;
  c = a + b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void decimalRestorer(float *x, int cnt) {
  if (cnt > 40)
    cnt = 40;
  while (cnt > 0) {
    (*x) = (*x) / 10;
    cnt--;
  }
}


x86 assembly (clang, -O0):
<decimalRestorer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x28,-0xc(%rbp)
jle    111c <decimalRestorer+0x1c>
movl   $0x28,-0xc(%rbp)
jmp    1121 <decimalRestorer+0x21>
cmpl   $0x0,-0xc(%rbp)
jle    1155 <decimalRestorer+0x55>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  0xec5(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <decimalRestorer+0x21>
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimalRestorer>:
test   %esi,%esi
jle    1130 <decimalRestorer+0x30>
cmp    $0x28,%esi
movss  (%rdi),%xmm0
mov    $0x28,%eax
cmovb  %esi,%eax
add    $0x1,%eax
movss  0xee2(%rip),%xmm1
xchg   %ax,%ax
divss  %xmm1,%xmm0
add    $0xffffffff,%eax
cmp    $0x1,%eax
ja     1120 <decimalRestorer+0x20>
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @decimalRestorer(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 40
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 40, i32* %4
br label %8
8: ; preds = %7, %2
br label %9
9: ; preds = %12, %8
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load float*, float** %3
%14 = load float, float* %13
%15 = fdiv float %14, 1.000000e+01
%16 = load float*, float** %3
store float %15, float* %16
%17 = load i32, i32* %4
%18 = add nsw i32 %17, -1
store i32 %18, i32* %4
br label %9
19: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @decimalRestorer(float* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = icmp ult i32 %1, 40
%6 = load float, float* %0
%7 = select i1 %5, i32 %1, i32 40
br label %8
8: ; preds = %4, %8
%9 = phi float [ %11, %8 ], [ %6, %4 ]
%10 = phi i32 [ %12, %8 ], [ %7, %4 ]
%11 = fdiv float %9, 1.000000e+01
%12 = add nsw i32 %10, -1
%13 = icmp ugt i32 %10, 1
br i1 %13, label %8, label %14
14: ; preds = %8
store float %11, float* %0
br label %15
15: ; preds = %14, %2
ret void
}