xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum_multiple_of(int, int);
int main() {
  int limit = 1000, operand_first = 3, operand_second = 5;
  int sum = sum_multiple_of(operand_first, limit) +
            sum_multiple_of(operand_second, limit) -
            sum_multiple_of(operand_first * operand_second, limit);
  printf("Sum: %d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <sum_multiple_of@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <sum_multiple_of@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
imul   -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <sum_multiple_of@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe76(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
mov    $0x3e8,%esi
call   1030 <sum_multiple_of@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0x3e8,%esi
call   1030 <sum_multiple_of@plt>
add    %eax,%ebx
mov    $0xf,%edi
mov    $0x3e8,%esi
call   1030 <sum_multiple_of@plt>
sub    %eax,%ebx
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Sum: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1000, i32* %2
store i32 3, i32* %3
store i32 5, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @sum_multiple_of(i32 %6, i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = call i32 @sum_multiple_of(i32 %9, i32 %10)
%12 = add nsw i32 %8, %11
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %2
%17 = call i32 @sum_multiple_of(i32 %15, i32 %16)
%18 = sub nsw i32 %12, %17
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Sum: %d\00"
define i32 @main() {
%1 = tail call i32 @sum_multiple_of(i32 3, i32 1000)
%2 = tail call i32 @sum_multiple_of(i32 5, i32 1000)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @sum_multiple_of(i32 15, i32 1000)
%5 = sub i32 %3, %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int sscanf(char *, char *, unsigned char *, unsigned char *, unsigned char *,
           unsigned char *, unsigned char *, unsigned char *);
int readmac(char *arg, unsigned char mac[6]) {
  char *mac_format = "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx";
  return (sscanf(arg, mac_format, &mac[0], &mac[1], &mac[2], &mac[3], &mac[4],
                 &mac[5]) == 6);
}


x86 assembly (clang, -O0):
<readmac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%r8
add    $0x2,%r8
mov    -0x10(%rbp),%r9
add    $0x3,%r9
mov    -0x10(%rbp),%r10
add    $0x4,%r10
mov    -0x10(%rbp),%rax
add    $0x5,%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <sscanf@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readmac>:
push   %rax
mov    %rsi,%rdx
lea    0x1(%rsi),%rcx
lea    0x2(%rsi),%r8
lea    0x3(%rsi),%r9
lea    0x4(%rsi),%r10
lea    0x5(%rsi),%rax
lea    0xed1(%rip),%rsi
push   %rax
push   %r10
call   1030 <sscanf@plt>
add    $0x10,%rsp
xor    %ecx,%ecx
cmp    $0x6,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\00"
define i32 @readmac(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 3
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 4
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 5
%20 = call i32 @sscanf(i8* %6, i8* %7, i8* %9, i8* %11, i8* %13, i8* %15, i8* %17, i8* %19)
%21 = icmp eq i32 %20, 6
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
@.str = [30 x i8] c"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\00"
define i32 @readmac(i8* nocapture %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = getelementptr inbounds i8, i8* %1, i64 2
%5 = getelementptr inbounds i8, i8* %1, i64 3
%6 = getelementptr inbounds i8, i8* %1, i64 4
%7 = getelementptr inbounds i8, i8* %1, i64 5
%8 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7)
%9 = icmp eq i32 %8, 6
%10 = zext i1 %9 to i32
ret i32 %10
}
unsigned int test9(unsigned int i) { return (i & 3) | 1; }


x86 assembly (clang, -O0):
<test9>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
or     $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test9>:
and    $0x2,%edi
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @test9(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 3
%5 = or i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @test9(i32 %0) {
%2 = and i32 %0, 2
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ detect_memory();
int /*<<< orphan*/ disable_interrupts();
int /*<<< orphan*/ enable_a20();
int /*<<< orphan*/ set_video_mode();
void head16_main(void) {
  disable_interrupts();
  set_video_mode();
  detect_memory();
  enable_a20();
}


x86 assembly (clang, -O0):
<head16_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <disable_interrupts@plt>
mov    $0x0,%al
call   1050 <set_video_mode@plt>
mov    $0x0,%al
call   1040 <detect_memory@plt>
mov    $0x0,%al
call   1030 <enable_a20@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<head16_main>:
push   %rax
xor    %eax,%eax
call   1060 <disable_interrupts@plt>
xor    %eax,%eax
call   1050 <set_video_mode@plt>
xor    %eax,%eax
call   1040 <detect_memory@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <enable_a20@plt>

LLVM IR (-O0):
define void @head16_main() {
%1 = call i32 (...) @disable_interrupts()
%2 = call i32 (...) @set_video_mode()
%3 = call i32 (...) @detect_memory()
%4 = call i32 (...) @enable_a20()
ret void
}

LLVM IR (-O2):
define void @head16_main() {
%1 = tail call i32 (...) @disable_interrupts()
%2 = tail call i32 (...) @set_video_mode()
%3 = tail call i32 (...) @detect_memory()
%4 = tail call i32 (...) @enable_a20()
ret void
}
void setDeferredMultiBulkLength(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               123, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<setDeferredMultiBulkLength>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x7b,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDeferredMultiBulkLength>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x7b,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.setDeferredMultiBulkLength = [27 x i8] c"setDeferredMultiBulkLength\00"
define void @setDeferredMultiBulkLength() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 123, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.setDeferredMultiBulkLength, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.setDeferredMultiBulkLength = [27 x i8] c"setDeferredMultiBulkLength\00"
define void @setDeferredMultiBulkLength() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 123, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.setDeferredMultiBulkLength, i64 0, i64 0))
ret void
}
void test_printf() {}


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

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

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

LLVM IR (-O2):
define void @test_printf() {
ret void
}
int test_imm_0Cint16_mem(short *val) {
  return ((*val) & (0x0C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Cint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Cint16_mem>:
testb  $0xc,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Cint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 12
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTDbgModRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModRetain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
void make_nonblock(int fd) {
  int flags;
  flags = fcntl(fd, F_GETFL, 0) | O_NONBLOCK;
  (void)fcntl(fd, F_SETFL, flags);
}


x86 assembly (clang, -O0):
<make_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_nonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2ebe(%rip),%rcx
or     (%rcx),%eax
mov    0x2ea5(%rip),%rcx
mov    (%rcx),%esi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define void @make_nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 @fcntl(i32 %4, i32 %5, i32 0)
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* @F_SETFL
%11 = load i32, i32* %3
%12 = call i32 @fcntl(i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define void @make_nonblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = load i32, i32* @O_NONBLOCK
%5 = or i32 %4, %3
%6 = load i32, i32* @F_SETFL
%7 = tail call i32 @fcntl(i32 %0, i32 %6, i32 %5)
ret void
}
void PGA_1_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @PGA_1_SaveConfig() {
ret void
}
void init_keybd() {}


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

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

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

LLVM IR (-O2):
define void @init_keybd() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void malfree(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<malfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <malfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malfree>:
test   %rdi,%rdi
je     111a <malfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @malfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @malfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct parserc {
  int dummy;
};

/* Variables and functions */
int parserc_parse(struct parserc *, char *);
int xmlbare_parser__parse_more(struct parserc *parser, char *text) {
  int err = parserc_parse(parser, text);
  return err;
}


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

x86 assembly (clang, -O2):
<xmlbare_parser__parse_more>:
jmp    1030 <parserc_parse@plt>

LLVM IR (-O0):
%struct.parserc = type { i32 }
define i32 @xmlbare_parser__parse_more(%struct.parserc* %0, i8* %1) {
%3 = alloca %struct.parserc*
%4 = alloca i8*
%5 = alloca i32
store %struct.parserc* %0, %struct.parserc** %3
store i8* %1, i8** %4
%6 = load %struct.parserc*, %struct.parserc** %3
%7 = load i8*, i8** %4
%8 = call i32 @parserc_parse(%struct.parserc* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.parserc = type { i32 }
define i32 @xmlbare_parser__parse_more(%struct.parserc* %0, i8* %1) {
%3 = tail call i32 @parserc_parse(%struct.parserc* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __aeabi_unwind_cpp_pr0(void) { abort(); }


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

x86 assembly (clang, -O2):
<__aeabi_unwind_cpp_pr0>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__aeabi_unwind_cpp_pr0() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @__aeabi_unwind_cpp_pr0() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
void init(int argc, char *argv[]) {
  {
    extern void input_init(int, char *[]);
    input_init(argc, argv);
  }
  {
    extern void main_init(int, char *[]);
    main_init(argc, argv);
  }
  {
    extern void prof_init(int, char *[]);
    prof_init(argc, argv);
  }
  {
    extern void trace_init(int, char *[]);
    trace_init(argc, argv);
  }
  {
    extern void type_init(int, char *[]);
    type_init(argc, argv);
  }
}


x86 assembly (clang, -O0):
<init>:
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   1070 <input_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <main_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <prof_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <trace_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <type_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1070 <input_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <main_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <prof_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <trace_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <type_init@plt>

LLVM IR (-O0):
define void @init(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = load i32, i32* %3
%10 = load i8**, i8*** %4
%11 = load i32, i32* %3
%12 = load i8**, i8*** %4
%13 = load i32, i32* %3
%14 = load i8**, i8*** %4
ret void
}

LLVM IR (-O2):
define void @init(i32 %0, i8** %1) {
tail call void @input_init(i32 %0, i8** %1)
tail call void @main_init(i32 %0, i8** %1)
tail call void @prof_init(i32 %0, i8** %1)
tail call void @trace_init(i32 %0, i8** %1)
tail call void @type_init(i32 %0, i8** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set32(int, int);
void HWResetEnable(void) { set32((0xd800000 + 0x194), 0x4800); }


x86 assembly (clang, -O0):
<HWResetEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd800194,%edi
mov    $0x4800,%esi
call   1030 <set32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HWResetEnable>:
mov    $0xd800194,%edi
mov    $0x4800,%esi
jmp    1030 <set32@plt>

LLVM IR (-O0):
define void @HWResetEnable() {
%1 = call i32 @set32(i32 226492820, i32 18432)
ret void
}

LLVM IR (-O2):
define void @HWResetEnable() {
%1 = tail call i32 @set32(i32 226492820, i32 18432)
ret void
}
long _recursiveFibonacci(long EV_number) {
  if (((EV_number <= 0) || (EV_number == 1))) {
    return EV_number;
  } else {
    return (_recursiveFibonacci((EV_number - 1)) +
            _recursiveFibonacci((EV_number - 2)));
  }
}


x86 assembly (clang, -O0):
<_recursiveFibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1132 <_recursiveFibonacci+0x22>
cmpq   $0x1,-0x10(%rbp)
jne    113f <_recursiveFibonacci+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <_recursiveFibonacci+0x5b>
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <_recursiveFibonacci@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x2,%rdi
call   1030 <_recursiveFibonacci@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_recursiveFibonacci>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
cmp    $0x2,%rdi
jl     1139 <_recursiveFibonacci+0x29>
mov    %rdi,%rbx
lea    -0x1(%rbx),%rdi
call   1030 <_recursiveFibonacci@plt>
lea    -0x2(%rbx),%rdi
add    %rax,%r14
cmp    $0x3,%rbx
mov    %rdi,%rbx
ja     1120 <_recursiveFibonacci+0x10>
add    %rdi,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @_recursiveFibonacci(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ %0, %1 ]
%5 = phi i64 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i64 %4, -1
%7 = tail call i64 @_recursiveFibonacci(i64 %6)
%8 = add nsw i64 %4, -2
%9 = add nsw i64 %7, %5
%10 = icmp ult i64 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i64 [ 0, %1 ], [ %9, %3 ]
%13 = phi i64 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i64 %13, %12
ret i64 %14
}
int main(void) {
  extern void test_config(void);
  extern void test_except(void);
  extern void test_hashtable(void);
  extern void test_memory(void);
  extern void test_scanner(void);
  extern void test_template(void);
  test_config();
  test_except();
  test_hashtable();
  test_memory();
  test_scanner();
  test_template();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
call   1080 <test_config@plt>
call   1070 <test_except@plt>
call   1030 <test_hashtable@plt>
call   1060 <test_memory@plt>
call   1050 <test_scanner@plt>
call   1040 <test_template@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1080 <test_config@plt>
call   1070 <test_except@plt>
call   1030 <test_hashtable@plt>
call   1060 <test_memory@plt>
call   1050 <test_scanner@plt>
call   1040 <test_template@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
tail call void @test_config()
tail call void @test_except()
tail call void @test_hashtable()
tail call void @test_memory()
tail call void @test_scanner()
tail call void @test_template()
ret i32 0
}
int is_brace(char c) {
  return c == '(' || c == ')' || c == '{' || c == '}' || c == '[' || c == ']';
}


x86 assembly (clang, -O0):
<is_brace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     1171 <is_brace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x29,%ecx
mov    %al,-0x2(%rbp)
je     1171 <is_brace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7b,%ecx
mov    %al,-0x2(%rbp)
je     1171 <is_brace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7d,%ecx
mov    %al,-0x2(%rbp)
je     1171 <is_brace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     1171 <is_brace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x5d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_brace>:
mov    $0x1,%eax
lea    -0x5b(%rdi),%ecx
cmp    $0x22,%cl
ja     1120 <is_brace+0x20>
movzbl %cl,%ecx
movabs $0x500000001,%rdx
bt     %rcx,%rdx
jb     1128 <is_brace+0x28>
lea    -0x28(%rdi),%ecx
cmp    $0x2,%cl
jae    1129 <is_brace+0x29>
ret
xor    %eax,%eax
cmp    $0x5d,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_brace(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, 40
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 41
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 123
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 125
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 91
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 93
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @is_brace(i8 signext %0) {
switch i8 %0, label %2 [
i8 125, label %5
i8 123, label %5
i8 91, label %5
i8 41, label %5
i8 40, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 93
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
struct mmc_host {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mmc_detect_change(struct mmc_host *, int /*<<< orphan*/);
int /*<<< orphan*/ printk(char *);
void host_detect(struct mmc_host *mmc) {
  printk(" redetect :");
  mmc_detect_change(mmc, 0);
}


x86 assembly (clang, -O0):
<host_detect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printk@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <mmc_detect_change@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_detect>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printk@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <mmc_detect_change@plt>

LLVM IR (-O0):
%struct.mmc_host = type { i32 }
@.str = [12 x i8] c" redetect :\00"
define void @host_detect(%struct.mmc_host* %0) {
%2 = alloca %struct.mmc_host*
store %struct.mmc_host* %0, %struct.mmc_host** %2
%3 = call i32 @printk(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.mmc_host*, %struct.mmc_host** %2
%5 = call i32 @mmc_detect_change(%struct.mmc_host* %4, i32 0)
ret void
}

LLVM IR (-O2):
%struct.mmc_host = type { i32 }
@.str = [12 x i8] c" redetect :\00"
define void @host_detect(%struct.mmc_host* %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mmc_detect_change(%struct.mmc_host* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strcompare_case_insensitive(char *, char *);
void exitservice(char ans[]) {
  printf("\nWant to exit? (Yes/No): ");
  scanf(" %99[^\n]", ans);
  if (strcompare_case_insensitive(ans, "yes"))
    exit(1);
}


x86 assembly (clang, -O0):
<exitservice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1040 <strcompare_case_insensitive@plt>
cmp    $0x0,%rax
je     118c <exitservice+0x4c>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exitservice>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcompare_case_insensitive@plt>
test   %rax,%rax
jne    1175 <exitservice+0x35>
pop    %rbx
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AWant to exit? (Yes/No): \00"
@.str.1 = [9 x i8] c" %99[^\0A]\00"
@.str.2 = [4 x i8] c"yes\00"
define void @exitservice(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i64 @strcompare_case_insensitive(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AWant to exit? (Yes/No): \00"
@.str.1 = [9 x i8] c" %99[^\0A]\00"
@.str.2 = [4 x i8] c"yes\00"
define void @exitservice(i8* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i64 @strcompare_case_insensitive(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int cont;
  int resto;
  for (cont = 5000; cont > 0; cont--) {
    printf("\n%d", cont);
  }
  printf("\nEste num = %d", cont);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1388,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1389,%ebx
lea    0xee0(%rip),%r14
add    $0xffffffff,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x1,%ebx
ja     1120 <main+0x10>
lea    0xecb(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [15 x i8] c"\0AEste num = %d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 5000, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nsw i32 %2, -1
%5 = icmp ugt i32 %2, 1
br i1 %5, label %1, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
int main(void) {
  int a[3];
  int b[2];
  &a[2] - &b[1];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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 [3 x i32]
%3 = alloca [2 x i32]
store i32 0, i32* %1
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%6 = ptrtoint i32* %4 to i64
%7 = ptrtoint i32* %5 to i64
%8 = sub i64 %6, %7
%9 = sdiv exact i64 %8, 4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int system(char *);
int carmen_commander_test_host(char *host) {
  int retval;
  char cmd[200];
  sprintf(cmd, "/bin/sh -c \" ping %s -q -w 1 -c 1 &> /dev/null\" ", host);
  retval = system(cmd);
  return (retval == 0);
}


x86 assembly (clang, -O0):
<carmen_commander_test_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_commander_test_host>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"/bin/sh -c \22 ping %s -q -w 1 -c 1 &> /dev/null\22 \00"
define i32 @carmen_commander_test_host(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [200 x i8]
store i8* %0, i8** %2
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%9 = call i32 @system(i8* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [49 x i8] c"/bin/sh -c \22 ping %s -q -w 1 -c 1 &> /dev/null\22 \00"
define i32 @carmen_commander_test_host(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int ssa_data_run();
int main(int argc, char **argv) {
  int retcode = 0;
  retcode = ssa_data_run();
  return retcode;
}


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)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <ssa_data_run@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ssa_data_run()
ret i32 %3
}
/* Variables and functions */
double strtod(char const *, char **);
int validate_double(const char *s) {
  char *end = 0;
  double d;
  if (!s)
    return 0;
  d = strtod(s, &end);
  if (end == s)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<validate_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113b <validate_double+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    116e <validate_double+0x5e>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1167 <validate_double+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116e <validate_double+0x5e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_double>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
test   %rdi,%rdi
je     113c <validate_double+0x2c>
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <strtod@plt>
xor    %eax,%eax
cmp    %rbx,0x8(%rsp)
setne  %al
jmp    113e <validate_double+0x2e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @validate_double(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = icmp eq i8* %0, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = call double @strtod(i8* %0, i8** %2)
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, %0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
unsigned int dev_port_get(unsigned int);
int /*<<< orphan*/ log_f(char *, unsigned int, unsigned int);
unsigned target_port_get(unsigned addr) {
  unsigned v;
  v = dev_port_get(addr);
  log_f("linux: port_get(0x%x) = 0x%02x\n", addr, v);
  return v;
}


x86 assembly (clang, -O0):
<target_port_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <dev_port_get@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <log_f@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_port_get>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <dev_port_get@plt>
mov    %eax,%ebp
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <log_f@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"linux: port_get(0x%x) = 0x%02x\0A\00"
define i32 @target_port_get(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @dev_port_get(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @log_f(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [32 x i8] c"linux: port_get(0x%x) = 0x%02x\0A\00"
define i32 @target_port_get(i32 %0) {
%2 = tail call i32 @dev_port_get(i32 %0)
%3 = tail call i32 @log_f(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
ret i32 %2
}
unsigned xrop3_216_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S ^ T;
  stk2 = D & stk3;
  stk1 = T ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_216_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_216_0_0>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %esi,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_216_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
ret i32 %32
}

LLVM IR (-O2):
define i32 @xrop3_216_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, %0
%6 = zext i8 %5 to i32
%7 = xor i32 %4, %6
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int icon_x;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
void set_XWMHints_icon_x(void *_p, int _v) {
  ((XWMHints *)_p)->icon_x = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XWMHints_icon_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Original test program removed while investigating its license.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [64 x i8] c"Original test program removed while investigating its license.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [63 x i8] c"Original test program removed while investigating its license.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c)) {
    c += 'A' - 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1136 <toupper+0x26>
mov    -0x4(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @islower(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -32
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void yy_2_TagBody(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_2_TagBody(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_csi_sgr(int /*<<< orphan*/);
void reset_attributes() { print_csi_sgr(0); }


x86 assembly (clang, -O0):
<reset_attributes>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <print_csi_sgr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_attributes>:
xor    %edi,%edi
jmp    1030 <print_csi_sgr@plt>

LLVM IR (-O0):
define void @reset_attributes() {
%1 = call i32 @print_csi_sgr(i32 0)
ret void
}

LLVM IR (-O2):
define void @reset_attributes() {
%1 = tail call i32 @print_csi_sgr(i32 0)
ret void
}
int test_imm_8Aint64_lowword_reg(long long val) {
  return ((val) & (0x8A << 0)) ? -20 : -40;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ mg_send_head(struct mg_connection *, int, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
void send_http_error(struct mg_connection *nc, int code, const char *reason) {
  (void)reason;
  mg_send_head(nc, code, 0, NULL);
}


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

x86 assembly (clang, -O2):
<send_http_error>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <mg_send_head@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @send_http_error(%struct.mg_connection* %0, i32 %1, i8* %2) {
%4 = alloca %struct.mg_connection*
%5 = alloca i32
%6 = alloca i8*
store %struct.mg_connection* %0, %struct.mg_connection** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load %struct.mg_connection*, %struct.mg_connection** %4
%9 = load i32, i32* %5
%10 = call i32 @mg_send_head(%struct.mg_connection* %8, i32 %9, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @send_http_error(%struct.mg_connection* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @mg_send_head(%struct.mg_connection* %0, i32 %1, i32 0, i32* null)
ret void
}