xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ imprimeSoma(int, int);
int /*<<< orphan*/ imprimeSubtracao(int, int);
int pegaValor(char *);
int main(void) {
  int valor1 = pegaValor("Valor 1: ");
  int valor2 = pegaValor("Valor 2: ");
  imprimeSoma(valor1, valor2);
  imprimeSubtracao(valor1, valor2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <pegaValor@plt>
mov    %eax,-0x8(%rbp)
lea    0xeb5(%rip),%rdi
call   1050 <pegaValor@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <imprimeSoma@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <imprimeSubtracao@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
call   1050 <pegaValor@plt>
mov    %eax,%ebx
lea    0xec2(%rip),%rdi
call   1050 <pegaValor@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <imprimeSoma@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <imprimeSubtracao@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Valor 1: \00"
@.str.1 = [10 x i8] c"Valor 2: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @pegaValor(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* %2
%5 = call i32 @pegaValor(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @imprimeSoma(i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @imprimeSubtracao(i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Valor 1: \00"
@.str.1 = [10 x i8] c"Valor 2: \00"
define i32 @main() {
%1 = tail call i32 @pegaValor(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pegaValor(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @imprimeSoma(i32 %1, i32 %2)
%4 = tail call i32 @imprimeSubtracao(i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ sigchain_pop(int);
int /*<<< orphan*/ wait_for_pager();
void wait_for_pager_signal(int signo) {
  wait_for_pager();
  sigchain_pop(signo);
  raise(signo);
}


x86 assembly (clang, -O0):
<wait_for_pager_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <wait_for_pager@plt>
mov    -0x4(%rbp),%edi
call   1050 <sigchain_pop@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_pager_signal>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <wait_for_pager@plt>
mov    %ebx,%edi
call   1050 <sigchain_pop@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
define void @wait_for_pager_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @wait_for_pager()
%4 = load i32, i32* %2
%5 = call i32 @sigchain_pop(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @raise(i32 %6)
ret void
}

LLVM IR (-O2):
define void @wait_for_pager_signal(i32 %0) {
%2 = tail call i32 (...) @wait_for_pager()
%3 = tail call i32 @sigchain_pop(i32 %0)
%4 = tail call i32 @raise(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ boardLoop();
int /*<<< orphan*/ clearScreen();
int /*<<< orphan*/ pauseMessageAndClearScreen(int /*<<< orphan*/ *);
int /*<<< orphan*/ printInstruction();
int /*<<< orphan*/ printLogo();
void boardGame() {
  clearScreen();
  printLogo();
  pauseMessageAndClearScreen(NULL);
  printInstruction();
  pauseMessageAndClearScreen(NULL);
  boardLoop();
}


x86 assembly (clang, -O0):
<boardGame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clearScreen@plt>
mov    $0x0,%al
call   1030 <printLogo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <pauseMessageAndClearScreen@plt>
mov    $0x0,%al
call   1060 <printInstruction@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <pauseMessageAndClearScreen@plt>
mov    $0x0,%al
call   1050 <boardLoop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boardGame>:
push   %rax
xor    %eax,%eax
call   1040 <clearScreen@plt>
xor    %eax,%eax
call   1030 <printLogo@plt>
xor    %edi,%edi
call   1070 <pauseMessageAndClearScreen@plt>
xor    %eax,%eax
call   1060 <printInstruction@plt>
xor    %edi,%edi
call   1070 <pauseMessageAndClearScreen@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <boardLoop@plt>

LLVM IR (-O0):
define void @boardGame() {
%1 = call i32 (...) @clearScreen()
%2 = call i32 (...) @printLogo()
%3 = call i32 @pauseMessageAndClearScreen(i32* null)
%4 = call i32 (...) @printInstruction()
%5 = call i32 @pauseMessageAndClearScreen(i32* null)
%6 = call i32 (...) @boardLoop()
ret void
}

LLVM IR (-O2):
define void @boardGame() {
%1 = tail call i32 (...) @clearScreen()
%2 = tail call i32 (...) @printLogo()
%3 = tail call i32 @pauseMessageAndClearScreen(i32* null)
%4 = tail call i32 (...) @printInstruction()
%5 = tail call i32 @pauseMessageAndClearScreen(i32* null)
%6 = tail call i32 (...) @boardLoop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
char *strdup(char const *);
char *estrdup(const char *s) {
  char *p;
  p = strdup(s);
  if (p == NULL)
    err(1, "Panic zero.  Rebooting...\n");
  return p;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <estrdup+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <estrdup+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Panic zero. Rebooting...\0A\00"
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [27 x i8] c"Panic zero. Rebooting...\0A\00"
define noalias i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
int read_bram(char *bram_name, char *dest, int bytes) {
  FILE *regfile;
  int rval;
  regfile = fopen(bram_name, "r");
  rval = fread(dest, bytes, 1, regfile);
  fclose(regfile);
  return rval;
}


x86 assembly (clang, -O0):
<read_bram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bram>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
lea    0xebf(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1040 <fclose@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @read_bram(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %7
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = load i32*, i32** %7
%14 = call i32 @fread(i8* %11, i32 %12, i32 1, i32* %13)
store i32 %14, i32* %8
%15 = load i32*, i32** %7
%16 = call i32 @fclose(i32* %15)
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @read_bram(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fread(i8* %1, i32 %2, i32 1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430InterruptP__Port24__default__fired();
void HplMsp430InterruptP__Port24__fired(void) {
  HplMsp430InterruptP__Port24__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430InterruptP__Port24__fired() {
%1 = tail call i32 (...) @HplMsp430InterruptP__Port24__default__fired()
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int int8_t;

/* Variables and functions */
uint64_t rotl64(uint64_t x, int8_t r) { return (x << r) | (x >> (64 - r)); }


x86 assembly (clang, -O0):
<rotl64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl64>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotl64(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void use_string(char *str, int index) {}


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

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

LLVM IR (-O0):
define void @use_string(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 @use_string(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct worker_message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct worker_message *);
void worker_message_free(struct worker_message *msg) { free(msg); }


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

x86 assembly (clang, -O2):
<worker_message_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.worker_message = type { i32 }
define void @worker_message_free(%struct.worker_message* nocapture %0) {
%2 = tail call i32 @free(%struct.worker_message* %0)
ret void
}
void kill() {}


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

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

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

LLVM IR (-O2):
define void @kill() {
ret void
}
float i2f(int x) {
  union {
    float f;
    int i;
  } tmp;
  tmp.i = x;
  return tmp.f;
}


x86 assembly (clang, -O0):
<i2f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2f>:
movd   %edi,%xmm0
ret

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

LLVM IR (-O2):
define float @i2f(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("hello");
  return 42;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2a,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 42
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 42
}
void g_queue_peek_tail_link() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_peek_tail_link() {
ret void
}
/* Type definitions */
struct usb_endpoint_descriptor {
  int dummy;
};

/* Variables and functions */
scalar_t__ usb_endpoint_dir_out(struct usb_endpoint_descriptor const *);
scalar_t__ usb_endpoint_xfer_isoc(struct usb_endpoint_descriptor const *);
int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd) {
  return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd);
}


x86 assembly (clang, -O0):
<usb_endpoint_is_isoc_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usb_endpoint_xfer_isoc@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115a <usb_endpoint_is_isoc_out+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <usb_endpoint_dir_out@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_endpoint_is_isoc_out>:
push   %rbx
mov    %rdi,%rbx
call   1040 <usb_endpoint_xfer_isoc@plt>
test   %rax,%rax
je     1143 <usb_endpoint_is_isoc_out+0x23>
mov    %rbx,%rdi
call   1030 <usb_endpoint_dir_out@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_isoc_out(%struct.usb_endpoint_descriptor* %0) {
%2 = alloca %struct.usb_endpoint_descriptor*
store %struct.usb_endpoint_descriptor* %0, %struct.usb_endpoint_descriptor** %2
%3 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%4 = call i64 @usb_endpoint_xfer_isoc(%struct.usb_endpoint_descriptor* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%8 = call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_isoc_out(%struct.usb_endpoint_descriptor* %0) {
%2 = tail call i64 @usb_endpoint_xfer_isoc(%struct.usb_endpoint_descriptor* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void notify_m10mo_atomisp_dead(void) { return; }


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

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

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

LLVM IR (-O2):
define void @notify_m10mo_atomisp_dead() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int Somma;
  int I;
  Somma = 0;
  I = 1;
  while (I <= 100) {
    Somma = Somma + I;
    I = I + 1;
  }
  printf("\nil valore della somma: %d", Somma);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jg     114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [27 x i8] c"\0Ail valore della somma: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 5050)
ret i32 0
}
/* Type definitions */
struct timespec {
  long tv_sec;
  long tv_nsec;
};

/* Variables and functions */
long ap_utils_timespec_to_milliseconds(struct timespec *ts) {
  long retval;
  retval = ts->tv_sec * 1000l;
  if (ts->tv_nsec > 0l)
    retval += ts->tv_nsec / 1000000l;
  return retval;
}


x86 assembly (clang, -O0):
<ap_utils_timespec_to_milliseconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jle    1140 <ap_utils_timespec_to_milliseconds+0x40>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_utils_timespec_to_milliseconds>:
imul   $0x3e8,(%rdi),%rcx
mov    0x8(%rdi),%rax
test   %rax,%rax
jle    1124 <ap_utils_timespec_to_milliseconds+0x24>
movabs $0x431bde82d7b634db,%rdx
de 1b 43
mul    %rdx
shr    $0x12,%rdx
add    %rdx,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @ap_utils_timespec_to_milliseconds(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i64
store %struct.timespec* %0, %struct.timespec** %2
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000
store i64 %7, i64* %3
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %1
%13 = load %struct.timespec*, %struct.timespec** %2
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %13, i32 0, i32 1
%15 = load i64, i64* %14
%16 = sdiv i64 %15, 1000000
%17 = load i64, i64* %3
%18 = add nsw i64 %17, %16
store i64 %18, i64* %3
br label %19
19: ; preds = %12, %1
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i64 @ap_utils_timespec_to_milliseconds(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%6 = load i64, i64* %5
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = udiv i64 %6, 1000000
%10 = add nsw i64 %9, %4
br label %11
11: ; preds = %8, %1
%12 = phi i64 [ %10, %8 ], [ %4, %1 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ foox(int /*<<< orphan*/, char *);
void baz(void) { foox(0, "p is null"); }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <foox@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <foox@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"p is null\00"
define void @baz() {
%1 = call i32 @foox(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"p is null\00"
define void @baz() {
%1 = tail call i32 @foox(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void HelloC(const char *msg) { printf("C : %s\n", msg); }


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

x86 assembly (clang, -O2):
<HelloC>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"C : %s\0A\00"
define void @HelloC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"C : %s\0A\00"
define void @HelloC(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int my_strlen(char *str) {
  int i;
  i = 0;
  while (*(str + i) != '\0') {
    i = i + 1;
  }
  return (i);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <my_strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef void shashset;

/* Variables and functions */
int /*<<< orphan*/ assert(void const *);
int shashset_item(void const *, void const *);
bool shashset_contains(const struct shashset *s, const void *key) {
  assert(s);
  assert(key);
  return shashset_item(s, key);
}


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

x86 assembly (clang, -O2):
<shashset_contains>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %r14,%rdi
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <shashset_item@plt>

LLVM IR (-O0):
%struct.shashset = type opaque
define i32 @shashset_contains(%struct.shashset* %0, i8* %1) {
%3 = alloca %struct.shashset*
%4 = alloca i8*
store %struct.shashset* %0, %struct.shashset** %3
store i8* %1, i8** %4
%5 = load %struct.shashset*, %struct.shashset** %3
%6 = bitcast %struct.shashset* %5 to i8*
%7 = call i32 @assert(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @assert(i8* %8)
%10 = load %struct.shashset*, %struct.shashset** %3
%11 = bitcast %struct.shashset* %10 to i8*
%12 = load i8*, i8** %4
%13 = call i32 @shashset_item(i8* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.shashset = type opaque
define i32 @shashset_contains(%struct.shashset* %0, i8* %1) {
%3 = bitcast %struct.shashset* %0 to i8*
%4 = tail call i32 @assert(i8* %3)
%5 = tail call i32 @assert(i8* %1)
%6 = tail call i32 @shashset_item(i8* %3, i8* %1)
ret i32 %6
}
int precision4(double value) {
  if (value < 10)
    return 2;
  else if (value < 100)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<precision4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1128 <precision4+0x28>
movl   $0x2,-0x4(%rbp)
jmp    1153 <precision4+0x53>
movsd  0xed8(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1147 <precision4+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1153 <precision4+0x53>
jmp    114c <precision4+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precision4>:
movsd  0xef8(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
movsd  0xeef(%rip),%xmm1
ucomisd %xmm0,%xmm1
mov    $0x2,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @precision4(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 1.000000e+01
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 2, i32* %2
br label %13
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 1.000000e+02
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %13
11: ; preds = %7
br label %12
12: ; preds = %11
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @precision4(double %0) {
%2 = fcmp olt double %0, 1.000000e+01
%3 = fcmp olt double %0, 1.000000e+02
%4 = zext i1 %3 to i32
%5 = select i1 %2, i32 2, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void print_help(const char *argv0) {
  fprintf(stderr, "Usage:\n%s [-I<search_directory>...] <file>\n", argv0);
}


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

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Usage:\0A%s [-I<search_directory>...] <file>\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Usage:\0A%s [-I<search_directory>...] <file>\0A\00"
define void @print_help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *strchr(const char *str, int ch) {
  char *s = (char *)str;
  while (*s && *s != ch)
    s++;
  return *s ? s : NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1138 <strchr+0x38>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1148 <strchr+0x48>
jmp    1159 <strchr+0x59>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <strchr+0x13>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1176 <strchr+0x76>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1181 <strchr+0x81>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1181 <strchr+0x81>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchr+0x20>
cmp    %esi,%ecx
jne    1110 <strchr+0x10>
xor    %edx,%edx
test   %cl,%cl
cmove  %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = select i1 %6, i8* null, i8* %4
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char *);
void strcpy_null_dst(char *x) { strcpy(0, x); }


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

x86 assembly (clang, -O2):
<strcpy_null_dst>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @strcpy_null_dst(i8* %0) {
%2 = tail call i32 @strcpy(i32 0, i8* %0)
ret void
}
int test_empty_fct() { return 7; }


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

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

LLVM IR (-O0):
define i32 @test_empty_fct() {
ret i32 7
}

LLVM IR (-O2):
define i32 @test_empty_fct() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ strcasecmp(char *, char *);
bool same_string_caseinsensitive(const char *a, const char *b) {
  return !strcasecmp(a ?: "", b ?: "");
}


x86 assembly (clang, -O0):
<same_string_caseinsensitive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     113f <same_string_caseinsensitive+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114f <same_string_caseinsensitive+0x3f>
lea    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    114f <same_string_caseinsensitive+0x3f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1176 <same_string_caseinsensitive+0x66>
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1186 <same_string_caseinsensitive+0x76>
lea    0xe83(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1186 <same_string_caseinsensitive+0x76>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<same_string_caseinsensitive>:
push   %rax
test   %rdi,%rdi
lea    0xee5(%rip),%rax
cmove  %rax,%rdi
test   %rsi,%rsi
cmove  %rax,%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @same_string_caseinsensitive(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %9
8: ; preds = %2
br label %9
9: ; preds = %8, %7
%10 = phi i8* [ %5, %7 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %8 ]
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %14
13: ; preds = %9
br label %15
14: ; preds = %9
br label %15
15: ; preds = %14, %13
%16 = phi i8* [ %11, %13 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %14 ]
%17 = call i32 @strcasecmp(i8* %10, i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @same_string_caseinsensitive(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = icmp eq i8* %1, null
%6 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %1
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
char *generarIdentificador(char *base, int numero) {
  char *ident = (char *)malloc(sizeof(char) * 256);
  sprintf(ident, "%s%d", base, numero);
  return ident;
}


x86 assembly (clang, -O0):
<generarIdentificador>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generarIdentificador>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,%rbp
lea    0xec2(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1040 <sprintf@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%d\00"
define i8* @generarIdentificador(i8* %0, i32 %1) {
%3 = tail call i64 @malloc(i32 256)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i8* %4
}
/* Variables and functions */
size_t map_roundup(size_t s) {
  s--;
  s |= s >> 1;
  s |= s >> 2;
  s |= s >> 4;
  s |= s >> 8;
  s |= s >> 16;
  s |= s >> 32;
  s++;
  return s;
}


x86 assembly (clang, -O0):
<map_roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x20,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_roundup>:
lea    -0x1(%rdi),%rax
mov    %rax,%rcx
shr    %rcx
or     %rax,%rcx
mov    %rcx,%rax
shr    $0x2,%rax
or     %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
or     %rax,%rcx
mov    %rcx,%rax
shr    $0x8,%rax
or     %rcx,%rax
mov    %rax,%rcx
shr    $0x10,%rcx
or     %rax,%rcx
mov    %rcx,%rax
shr    $0x20,%rax
or     %rcx,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @map_roundup(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, -1
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 1
%7 = load i64, i64* %2
%8 = or i64 %7, %6
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = lshr i64 %9, 2
%11 = load i64, i64* %2
%12 = or i64 %11, %10
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = lshr i64 %13, 4
%15 = load i64, i64* %2
%16 = or i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = lshr i64 %17, 8
%19 = load i64, i64* %2
%20 = or i64 %19, %18
store i64 %20, i64* %2
%21 = load i64, i64* %2
%22 = lshr i64 %21, 16
%23 = load i64, i64* %2
%24 = or i64 %23, %22
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = lshr i64 %25, 32
%27 = load i64, i64* %2
%28 = or i64 %27, %26
store i64 %28, i64* %2
%29 = load i64, i64* %2
%30 = add i64 %29, 1
store i64 %30, i64* %2
%31 = load i64, i64* %2
ret i64 %31
}

LLVM IR (-O2):
define i64 @map_roundup(i64 %0) {
%2 = add i64 %0, -1
%3 = lshr i64 %2, 1
%4 = or i64 %3, %2
%5 = lshr i64 %4, 2
%6 = or i64 %5, %4
%7 = lshr i64 %6, 4
%8 = or i64 %7, %6
%9 = lshr i64 %8, 8
%10 = or i64 %9, %8
%11 = lshr i64 %10, 16
%12 = or i64 %11, %10
%13 = lshr i64 %12, 32
%14 = or i64 %13, %12
%15 = add i64 %14, 1
ret i64 %15
}
int do_490() { return 490; }


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

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

LLVM IR (-O0):
define i32 @do_490() {
ret i32 490
}

LLVM IR (-O2):
define i32 @do_490() {
ret i32 490
}
int mdc(int a, int b) {
  if (b == 0)
    return a;
  else
    return mdc(b, a % b);
}


x86 assembly (clang, -O0):
<mdc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <mdc+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <mdc+0x37>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <mdc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdc>:
mov    %edi,%eax
test   %esi,%esi
je     111d <mdc+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <mdc+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @mdc(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ do_backtrace();
int /*<<< orphan*/ lib_f(int, void (*)(int));
void x(int i, ...) {
  do_backtrace();
  lib_f(1, &x);
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
call   1030 <do_backtrace@plt>
mov    0x2ea7(%rip),%rsi
mov    $0x1,%edi
call   1040 <lib_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x>:
push   %rax
xor    %eax,%eax
call   1030 <do_backtrace@plt>
mov    0x2eb1(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <lib_f@plt>

LLVM IR (-O0):
define void @x(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @do_backtrace()
%4 = call i32 @lib_f(i32 1, void (i32)* bitcast (void (i32, ...)* @x to void (i32)*))
ret void
}

LLVM IR (-O2):
define void @x(i32 %0, ...) {
%2 = tail call i32 (...) @do_backtrace()
%3 = tail call i32 @lib_f(i32 1, void (i32)* bitcast (void (i32, ...)* @x to void (i32)*))
ret void
}
/* Variables and functions */
size_t cwk_path_output_sized(char *, size_t, size_t, char *, int);
size_t cwk_path_output_back(char *buffer, size_t buffer_size, size_t position) {
  return cwk_path_output_sized(buffer, buffer_size, position, "..", 2);
}


x86 assembly (clang, -O0):
<cwk_path_output_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
mov    $0x2,%r8d
call   1030 <cwk_path_output_sized@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwk_path_output_back>:
lea    0xee9(%rip),%rcx
mov    $0x2,%r8d
jmp    1030 <cwk_path_output_sized@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"..\00"
define i64 @cwk_path_output_back(i8* %0, i64 %1, i64 %2) {
%4 = tail call i64 @cwk_path_output_sized(i8* %0, i64 %1, i64 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i64 %4
}
void ff_hevc_put_hevc_bi_qpel_h48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h48_8_sse4() {
ret void
}
short special(c)
short c;
{
  if (strchr(".[*()|$+<{", c))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%esi
lea    0xed6(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1144 <special+0x34>
movw   $0x1,-0x2(%rbp)
jmp    114a <special+0x3a>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
push   %rax
movswl %di,%esi
lea    0xee5(%rip),%rdi
mov    $0xb,%edx
call   1030 <memchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c".[*()|$+<{\00"
define signext i16 @special(i32 %0) {
%2 = alloca i16
%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
%7 = call i8* @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i16 1, i16* %2
br label %11
10: ; preds = %1
store i16 0, i16* %2
br label %11
11: ; preds = %10, %9
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
@.str = [11 x i8] c".[*()|$+<{\00"
define signext i16 @special(i32 %0) {
%2 = shl i32 %0, 16
%3 = ashr exact i32 %2, 16
%4 = tail call i8* @memchr(i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3, i64 11)
%5 = icmp ne i8* %4, null
%6 = zext i1 %5 to i16
ret i16 %6
}