xunge/DecIR huggingface dataset:
unsigned char xlat(unsigned char *base, unsigned char index) {
  register unsigned char result asm("%al") = index;
  register unsigned char *b asm("%ebx") = base;
  __asm__("xlat" : "=a"(result) : "a"(result), "r"(b));
  return result;
}


x86 assembly (clang, -O0):
<xlat>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x12(%rbp),%al
mov    -0x20(%rbp),%rbx
xlat   %ds:(%rbx)
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlat>:
push   %rbx
mov    %esi,%eax
mov    %rdi,%rbx
xlat   %ds:(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @xlat(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
store i8 %7, i8* %5
%8 = load i8*, i8** %3
store i8* %8, i8** %6
%9 = load i8, i8* %5
%10 = load i8*, i8** %6
%11 = call i8 asm "xlat", "={al},{al},{ebx},~{dirflag},~{fpsr},~{flags}"(i8 %9, i8* %10)
store i8 %11, i8* %5
%12 = load i8, i8* %5
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @xlat(i8* readnone %0, i8 zeroext %1) {
%3 = tail call i8 asm "xlat", "={al},{al},{ebx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i8* %0)
ret i8 %3
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, int);
int picgetirq(void) {
  int irq;
  outb(0x20, 0x0c);
  irq = inb(0x20) & 7;
  if (irq == 2) {
    outb(0xA0, 0x0c);
    irq = (inb(0xA0) & 7) + 8;
    outb(0xA0, 0x0a);
  }
  outb(0x20, 0x0a);
  return irq;
}


x86 assembly (clang, -O0):
<picgetirq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20,%edi
mov    $0xc,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
call   1040 <inb@plt>
and    $0x7,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1182 <picgetirq+0x62>
mov    $0xa0,%edi
mov    $0xc,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
call   1040 <inb@plt>
and    $0x7,%eax
add    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    $0xa0,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<picgetirq>:
push   %rbx
mov    $0x20,%edi
mov    $0xc,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
call   1040 <inb@plt>
mov    %eax,%ebx
and    $0x7,%ebx
cmp    $0x2,%ebx
jne    1174 <picgetirq+0x54>
mov    $0xa0,%edi
mov    $0xc,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
call   1040 <inb@plt>
mov    %eax,%ebx
and    $0x7,%ebx
or     $0x8,%ebx
mov    $0xa0,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @picgetirq() {
%1 = alloca i32
%2 = call i32 @outb(i32 32, i32 12)
%3 = call i32 @inb(i32 32)
%4 = and i32 %3, 7
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = call i32 @outb(i32 160, i32 12)
%9 = call i32 @inb(i32 160)
%10 = and i32 %9, 7
%11 = add nsw i32 %10, 8
store i32 %11, i32* %1
%12 = call i32 @outb(i32 160, i32 10)
br label %13
13: ; preds = %7, %0
%14 = call i32 @outb(i32 32, i32 10)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @picgetirq() {
%1 = tail call i32 @outb(i32 32, i32 12)
%2 = tail call i32 @inb(i32 32)
%3 = and i32 %2, 7
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = tail call i32 @outb(i32 160, i32 12)
%7 = tail call i32 @inb(i32 160)
%8 = and i32 %7, 7
%9 = or i32 %8, 8
%10 = tail call i32 @outb(i32 160, i32 10)
br label %11
11: ; preds = %5, %0
%12 = phi i32 [ %9, %5 ], [ %3, %0 ]
%13 = tail call i32 @outb(i32 32, i32 10)
ret i32 %12
}
int test_imm_DDuint16_mem(unsigned short *val) {
  return ((*val) & (0xDD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DDuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 221
%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_DDuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 221
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void random_init() { srand((unsigned int)time(NULL)); }


x86 assembly (clang, -O0):
<random_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @random_init() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @random_init() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void package_get_log_size(char *buffer) {
  memset(buffer, 0, 17 - 1);
  buffer[0x00] = 0x5a;
  buffer[0x01] = 0x46;
}


x86 assembly (clang, -O0):
<package_get_log_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
movb   $0x5a,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x46,0x1(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<package_get_log_size>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
movw   $0x465a,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @package_get_log_size(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 16)
store i8 90, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 70, i8* %3
ret void
}
void system_soft_wdt_stop() {}


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

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

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

LLVM IR (-O2):
define void @system_soft_wdt_stop() {
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *platform_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<platform_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @platform_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void afficherLigne(int val, int longueur) {
  printf("%i\t", val);
  for (int i = 0; i < longueur; ++i) {
    printf("*");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<afficherLigne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <afficherLigne+0x4e>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <afficherLigne+0x26>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherLigne>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    114f <afficherLigne+0x2f>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <afficherLigne+0x20>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\09\00"
define void @afficherLigne(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %7, %2
%6 = tail call i32 @putchar(i32 10)
ret void
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 @putchar(i32 42)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %1
br i1 %11, label %5, label %7
}
/* Type definitions */
struct rtable_t {
  int dummy;
};

/* Variables and functions */
int network_connect(struct rtable_t *);
int rtable_connect(struct rtable_t *table) { return network_connect(table); }


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

x86 assembly (clang, -O2):
<rtable_connect>:
jmp    1030 <network_connect@plt>

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

LLVM IR (-O2):
%struct.rtable_t = type { i32 }
define i32 @rtable_connect(%struct.rtable_t* %0) {
%2 = tail call i32 @network_connect(%struct.rtable_t* %0)
ret i32 %2
}
unsigned int weston_platform_destroy_egl_surface(void *display, void *surface) {
  return 1;
}


x86 assembly (clang, -O0):
<weston_platform_destroy_egl_surface>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @weston_platform_destroy_egl_surface(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
char getBit(char bitP, char targB) {
  targB = targB & (1 << bitP);
  if (targB == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<getBit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
movsbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x0,%eax
jne    113c <getBit+0x3c>
movb   $0x0,-0x1(%rbp)
jmp    1140 <getBit+0x40>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBit>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
test   %sil,%al
setne  %al
ret

LLVM IR (-O0):
define signext i8 @getBit(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = shl i32 1, %9
%11 = and i32 %7, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %5
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i8 0, i8* %3
br label %18
17: ; preds = %2
store i8 1, i8* %3
br label %18
18: ; preds = %17, %16
%19 = load i8, i8* %3
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @getBit(i8 signext %0, i8 signext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw i32 1, %3
%5 = trunc i32 %4 to i8
%6 = and i8 %5, %1
%7 = icmp ne i8 %6, 0
%8 = zext i1 %7 to i8
ret i8 %8
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *os_strncpy(char *dest, const char *src, size_t n) {
  return strncpy(dest, src, n);
}


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

x86 assembly (clang, -O2):
<os_strncpy>:
jmp    1030 <strncpy@plt>

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

LLVM IR (-O2):
define i8* @os_strncpy(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
int gzputs(void *, char const *);
int gz_file_handler_print(void *file, const char *str) {
  return gzputs(file, str);
}


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

x86 assembly (clang, -O2):
<gz_file_handler_print>:
jmp    1030 <gzputs@plt>

LLVM IR (-O0):
define i32 @gz_file_handler_print(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 = load i8*, i8** %4
%7 = call i32 @gzputs(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @gz_file_handler_print(i8* %0, i8* %1) {
%3 = tail call i32 @gzputs(i8* %0, i8* %1)
ret i32 %3
}
void memory_cleanup(struct Memory *mem) {}


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

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

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

LLVM IR (-O2):
%struct.Memory = type opaque
define void @memory_cleanup(%struct.Memory* nocapture %0) {
ret void
}
double divSum(double x, double y) { return x / y; }


x86 assembly (clang, -O0):
<divSum>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<divSum>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @divSum(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @divSum(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void gtk_window_list_toplevels() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_list_toplevels() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ sbox32_hash_with_state(unsigned char *,
                                          unsigned char const *, int const);
int /*<<< orphan*/ sbox32_seed_state128(unsigned char const *, unsigned char *);
uint32_t sbox32_hash128(const unsigned char *seed_ch, const unsigned char *key,
                        const int key_len) {
  uint32_t state[(1 + (256 * 256))];
  sbox32_seed_state128(seed_ch, (unsigned char *)state);
  return sbox32_hash_with_state((unsigned char *)state, key, key_len);
}


x86 assembly (clang, -O0):
<sbox32_hash128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40020,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x40020(%rbp),%rsi
call   1040 <sbox32_seed_state128@plt>
lea    -0x40020(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <sbox32_hash_with_state@plt>
add    $0x40020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbox32_hash128>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40010,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <sbox32_seed_state128@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <sbox32_hash_with_state@plt>
add    $0x40010,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sbox32_hash128(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [65537 x i32]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [65537 x i32], [65537 x i32]* %7, i64 0, i64 0
%10 = bitcast i32* %9 to i8*
%11 = call i32 @sbox32_seed_state128(i8* %8, i8* %10)
%12 = getelementptr inbounds [65537 x i32], [65537 x i32]* %7, i64 0, i64 0
%13 = bitcast i32* %12 to i8*
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = call i32 @sbox32_hash_with_state(i8* %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @sbox32_hash128(i8* %0, i8* %1, i32 %2) {
%4 = alloca [65537 x i32]
%5 = bitcast [65537 x i32]* %4 to i8*
%6 = call i32 @sbox32_seed_state128(i8* %0, i8* %5)
%7 = call i32 @sbox32_hash_with_state(i8* %5, i8* %1, i32 %2)
ret i32 %7
}
int old_printf() { return 0; }


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

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

LLVM IR (-O0):
define i32 @old_printf() {
ret i32 0
}

LLVM IR (-O2):
define i32 @old_printf() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_thin_bounds_int(unsigned int);
void *Cyc_Absyn_bounds_one() {
  static void *bone = 0;
  void *b = bone;
  if (b == 0) {
    b = ({ Cyc_Absyn_thin_bounds_int(1U); });
    bone = b;
  }
  return b;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_bounds_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2f11(%rip),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114e <Cyc_Absyn_bounds_one+0x3e>
mov    $0x1,%edi
call   1030 <Cyc_Absyn_thin_bounds_int@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,0x2ee2(%rip)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_bounds_one>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <Cyc_Absyn_bounds_one+0xf>
pop    %rcx
ret
mov    $0x1,%edi
call   1030 <Cyc_Absyn_thin_bounds_int@plt>
cltq
mov    %rax,0x2efe(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@Cyc_Absyn_bounds_one.bone = internal global i8* null
define i8* @Cyc_Absyn_bounds_one() {
%1 = alloca i8*
%2 = alloca i32
%3 = load i8*, i8** @Cyc_Absyn_bounds_one.bone
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = call i32 @Cyc_Absyn_thin_bounds_int(i32 1)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %1
%11 = load i8*, i8** %1
store i8* %11, i8** @Cyc_Absyn_bounds_one.bone
br label %12
12: ; preds = %6, %0
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@Cyc_Absyn_bounds_one.bone = internal unnamed_addr global i8* null
define i8* @Cyc_Absyn_bounds_one() {
%1 = load i8*, i8** @Cyc_Absyn_bounds_one.bone
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @Cyc_Absyn_thin_bounds_int(i32 1)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** @Cyc_Absyn_bounds_one.bone
br label %7
7: ; preds = %3, %0
%8 = phi i8* [ %6, %3 ], [ %1, %0 ]
ret i8* %8
}
__attribute__((weak)) void fd_nrf8001_setup_continue(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_setup_continue() {
ret void
}
void INT_Excep_MTU3_TGIC3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU3_TGIC3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int);
int main() {
  int n = 100;
  printf("%d", sum(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @sum(i32 100)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
char const *p_type(int type) {
  void *__cil_tmp2;
  {
    {
      __cil_tmp2 = (void *)0;
      return ((char const *)__cil_tmp2);
    }
  }
}


x86 assembly (clang, -O0):
<p_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @p_type(i32 %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xf1() {
  Assert_real((isupper(241) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1210, ("isupper should be 0 for 0xf1"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xf1\00"
define void @t_isupper_0xf1() {
%1 = tail call i64 @isupper(i32 241)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1210, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *__get_curdir();
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *getwd(char *buffer) {
  if (buffer == 0)
    return 0;
  char *p = __get_curdir();
  sprintf(buffer, "%s", p);
  return buffer;
}


x86 assembly (clang, -O0):
<getwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <getwd+0x24>
movq   $0x0,-0x8(%rbp)
jmp    116b <getwd+0x4b>
mov    $0x0,%al
call   1040 <__get_curdir@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xea2(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getwd>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     113b <getwd+0x1b>
xor    %eax,%eax
call   1040 <__get_curdir@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @getwd(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* (...) @__get_curdir()
%5 = tail call i8* @strcpy(i8* %0, i8* dereferenceable(1) %4)
br label %6
6: ; preds = %1, %3
ret i8* %0
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
int e(struct can_frame frame) { return frame.data[0] >> 1 & 0x1; }


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x1,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<e>:
mov    (%rdi),%eax
shr    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define i32 @e(i32* %0) {
%2 = alloca %struct.can_frame
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
store i32* %0, i32** %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = ashr i32 %7, 1
%9 = and i32 %8, 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @e(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = lshr i32 %2, 1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
double dlapy2_(double *, double *);
double aa_cla_dlapy2(double x, double y) { return dlapy2_(&x, &y); }


x86 assembly (clang, -O0):
<aa_cla_dlapy2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <dlapy2_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_dlapy2>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <dlapy2_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @aa_cla_dlapy2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double @dlapy2_(double* %3, double* %4)
ret double %5
}

LLVM IR (-O2):
define double @aa_cla_dlapy2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double @dlapy2_(double* %3, double* %4)
ret double %5
}
/* Type definitions */
struct siginfoq {
  int dummy;
};
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int ENOSYS;
int siginfoq_dequeue(struct siginfoq *infoq, int sig, siginfo_t *info) {
  (void)infoq;
  (void)sig;
  (void)info;
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<siginfoq_dequeue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<siginfoq_dequeue>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.siginfoq = type { i32 }
@ENOSYS = global i32 0
define i32 @siginfoq_dequeue(%struct.siginfoq* %0, i32 %1, i32* %2) {
%4 = alloca %struct.siginfoq*
%5 = alloca i32
%6 = alloca i32*
store %struct.siginfoq* %0, %struct.siginfoq** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load %struct.siginfoq*, %struct.siginfoq** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = load i32, i32* @ENOSYS
%11 = sub nsw i32 0, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.siginfoq = type { i32 }
@ENOSYS = global i32 0
define i32 @siginfoq_dequeue(%struct.siginfoq* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
void _mesa_svga16_dummy_function(void) {}


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

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

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

LLVM IR (-O2):
define void @_mesa_svga16_dummy_function() {
ret void
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_expired(char *filename) {
  char *args[3];
  args[0] = "expired";
  args[1] = filename;
  args[2] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_expired>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_expired>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
mov    %rdi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"expired\00"
define i32 @audit_warn_expired(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
store i8* %0, i8** %5
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
store i8* null, i8** %6
%7 = call i32 @auditwarnlog(i8** %4)
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int testBit_fun_uint32_t(uint32_t x, uint32_t i) { return (x & 1 << i) != 0; }


x86 assembly (clang, -O0):
<testBit_fun_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBit_fun_uint32_t>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @testBit_fun_uint32_t(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 1, %6
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @testBit_fun_uint32_t(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ hello(int **);
int /*<<< orphan*/ hello2(int **);
int main(void) {
  int a[3][4] = {0};
  a[1][0] = 1;
  a[1][1] = 2;
  a[1][2] = 3;
  a[1][3] = 4;
  hello(&a[1]);
  hello2((int **)&a[1][0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
movl   $0x3,-0x28(%rbp)
movl   $0x4,-0x24(%rbp)
lea    -0x40(%rbp),%rdi
add    $0x10,%rdi
call   1040 <hello@plt>
lea    -0x40(%rbp),%rdi
add    $0x10,%rdi
call   1050 <hello2@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%rbx
movaps 0xec3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1030 <hello@plt>
mov    %rbx,%rdi
call   1040 <hello2@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [4 x i32]]
store i32 0, i32* %1
%3 = bitcast [3 x [4 x i32]]* %2 to i8*
%4 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
store i32 1, i32* %5
%6 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
store i32 2, i32* %7
%8 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 2
store i32 3, i32* %9
%10 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0, i64 3
store i32 4, i32* %11
%12 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%13 = bitcast [4 x i32]* %12 to i32**
%14 = call i32 @hello(i32** %13)
%15 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %2, i64 0, i64 1
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%17 = bitcast i32* %16 to i32**
%18 = call i32 @hello2(i32** %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x [4 x i32]]
%2 = bitcast [3 x [4 x i32]]* %1 to i8*
%3 = getelementptr inbounds [3 x [4 x i32]], [3 x [4 x i32]]* %1, i64 0, i64 1
%4 = bitcast [4 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %4
%5 = bitcast [4 x i32]* %3 to i32**
%6 = call i32 @hello(i32** %5)
%7 = call i32 @hello2(i32** %5)
ret i32 0
}
/* Type definitions */
struct path {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete_path(struct path *);
struct path *new_path_from_abspath(char *);
char *path2str(struct path *, int /*<<< orphan*/);
char *canonicalize_abspath(char *abspath) {
  struct path *p = new_path_from_abspath(abspath);
  char *ret = path2str(p, 0);
  delete_path(p);
  return ret;
}


x86 assembly (clang, -O0):
<canonicalize_abspath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <new_path_from_abspath@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <path2str@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <delete_path@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canonicalize_abspath>:
push   %r14
push   %rbx
push   %rax
call   1030 <new_path_from_abspath@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <path2str@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <delete_path@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.path = type { i32 }
define i8* @canonicalize_abspath(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.path*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call %struct.path* @new_path_from_abspath(i8* %5)
store %struct.path* %6, %struct.path** %3
%7 = load %struct.path*, %struct.path** %3
%8 = call i8* @path2str(%struct.path* %7, i32 0)
store i8* %8, i8** %4
%9 = load %struct.path*, %struct.path** %3
%10 = call i32 @delete_path(%struct.path* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
%struct.path = type { i32 }
define i8* @canonicalize_abspath(i8* %0) {
%2 = tail call %struct.path* @new_path_from_abspath(i8* %0)
%3 = tail call i8* @path2str(%struct.path* %2, i32 0)
%4 = tail call i32 @delete_path(%struct.path* %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ stopTriangle(int /*<<< orphan*/);
void stopTone(uint8_t voice) { stopTriangle(voice); }


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

x86 assembly (clang, -O2):
<stopTone>:
jmp    1030 <stopTriangle@plt>

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

LLVM IR (-O2):
define void @stopTone(i32 %0) {
%2 = tail call i32 @stopTriangle(i32 %0)
ret void
}
int pathconN_nm2_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathconN_nm2_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathconN_nm2_n_out() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ doubleToString(char *, double);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  double num = 341234.123456;
  char output[4];
  doubleToString(output, num);
  printf("double is = %s", output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <doubleToString@plt>
lea    -0x14(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
movsd  0xece(%rip),%xmm0
mov    %rbx,%rdi
call   1040 <doubleToString@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"double is = %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [4 x i8]
store i32 0, i32* %1
store double 0x4114D3C87E6B3FEA, double* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load double, double* %2
%6 = call i32 @doubleToString(i8* %4, double %5)
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"double is = %s\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @doubleToString(i8* %2, double 0x4114D3C87E6B3FEA)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
main() {
  double radio, volumen;
  printf("Radio de la esfera: ");
  scanf("%lf", &radio);
  volumen = 4.0 / 3.0 * 3.141593 * radio * radio * radio;
  printf("Volumen de la esfera = %.4f\n", volumen);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xeb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Radio de la esfera: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [29 x i8] c"Volumen de la esfera = %.4f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double 0x4010C152572C7E54, %5
%7 = load double, double* %1
%8 = fmul double %6, %7
%9 = load double, double* %1
%10 = fmul double %8, %9
store double %10, double* %2
%11 = load double, double* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Radio de la esfera: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [29 x i8] c"Volumen de la esfera = %.4f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 0x4010C152572C7E54
%7 = fmul double %5, %6
%8 = fmul double %5, %7
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
void *_calloc(size_t, size_t);
void *calloc(size_t num, size_t size) { return _calloc(num, size); }


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

x86 assembly (clang, -O2):
<calloc>:
jmp    1030 <_calloc@plt>

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = tail call i8* @_calloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ feraiseexcept(int);
int __quadmath_feraiseexcept(int xcpt) { feraiseexcept(xcpt); }


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

x86 assembly (clang, -O2):
<__quadmath_feraiseexcept>:
jmp    1030 <feraiseexcept@plt>

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

LLVM IR (-O2):
define i32 @__quadmath_feraiseexcept(i32 %0) {
%2 = tail call i32 @feraiseexcept(i32 %0)
ret i32 undef
}