xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gt_free_mem(void *, char *, int);
void gt_free_func(void *ptr) {
  if (!ptr)
    return;
  gt_free_mem(ptr,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bioh4x/NeatFreq/refs/heads/master/lib/"
              "genometools-1.4.1/src/core/ma.c",
              243);
}


x86 assembly (clang, -O0):
<gt_free_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <gt_free_func+0x1c>
jmp    1141 <gt_free_func+0x31>
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0xf3,%edx
call   1030 <gt_free_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_free_func>:
test   %rdi,%rdi
je     1126 <gt_free_func+0x16>
lea    0xee4(%rip),%rsi
mov    $0xf3,%edx
jmp    1030 <gt_free_mem@plt>
ret

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bioh4x/NeatFreq/refs/heads/master/lib/genometools-1.4.1/src/core/ma.c\00"
define void @gt_free_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @gt_free_mem(i8* %7, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 243)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bioh4x/NeatFreq/refs/heads/master/lib/genometools-1.4.1/src/core/ma.c\00"
define void @gt_free_func(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @gt_free_mem(i8* %0, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 243)
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ dll_write(int, void const *, size_t);
ssize_t __wrap_write(int fd, const void *buf, size_t count) {
  return dll_write(fd, buf, count);
}


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

x86 assembly (clang, -O2):
<__wrap_write>:
jmp    1030 <dll_write@plt>

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

LLVM IR (-O2):
define i32 @__wrap_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @dll_write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
void lmc_um_setbit(char *bf, size_t i, size_t v) {
  bf += i / 8;
  if (v)
    *bf |= 1 << (i % 8);
  else
    *bf &= ~(1 << (i % 8));
}


x86 assembly (clang, -O0):
<lmc_um_setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114c <lmc_um_setbit+0x4c>
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
jmp    116b <lmc_um_setbit+0x6b>
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmc_um_setbit>:
mov    %rsi,%rcx
shr    $0x3,%rsi
and    $0x7,%cl
mov    $0x1,%al
shl    %cl,%al
test   %rdx,%rdx
je     111a <lmc_um_setbit+0x1a>
or     (%rdi,%rsi,1),%al
mov    %al,(%rdi,%rsi,1)
ret
not    %al
and    (%rdi,%rsi,1),%al
mov    %al,(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @lmc_um_setbit(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 i64, i64* %5
%8 = udiv i64 %7, 8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 %8
store i8* %10, i8** %4
%11 = load i64, i64* %6
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %3
%14 = load i64, i64* %5
%15 = urem i64 %14, 8
%16 = trunc i64 %15 to i32
%17 = shl i32 1, %16
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = or i32 %20, %17
%22 = trunc i32 %21 to i8
store i8 %22, i8* %18
br label %34
23: ; preds = %3
%24 = load i64, i64* %5
%25 = urem i64 %24, 8
%26 = trunc i64 %25 to i32
%27 = shl i32 1, %26
%28 = xor i32 %27, -1
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = and i32 %31, %28
%33 = trunc i32 %32 to i8
store i8 %33, i8* %29
br label %34
34: ; preds = %23, %13
ret void
}

LLVM IR (-O2):
define void @lmc_um_setbit(i8* nocapture %0, i64 %1, i64 %2) {
%4 = lshr i64 %1, 3
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = icmp eq i64 %2, 0
%7 = trunc i64 %1 to i8
%8 = and i8 %7, 7
%9 = shl nuw i8 1, %8
br i1 %6, label %13, label %10
10: ; preds = %3
%11 = load i8, i8* %5
%12 = or i8 %11, %9
br label %17
13: ; preds = %3
%14 = xor i8 %9, -1
%15 = load i8, i8* %5
%16 = and i8 %15, %14
br label %17
17: ; preds = %13, %10
%18 = phi i8 [ %16, %13 ], [ %12, %10 ]
store i8 %18, i8* %5
ret void
}
int config_CARDREADER_INTERNAL_SCI(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_CARDREADER_INTERNAL_SCI() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void DESIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0xFFFF8030))) &=
      ~((ui32IntFlags & 0x00070000) >> 16);
  (*((volatile unsigned long *)(ui32Base + 0x00000040))) &=
      ~(ui32IntFlags & 0x0000ffff);
}


x86 assembly (clang, -O0):
<DESIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x70000,%eax
sar    $0x10,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0xffff8030,%eax
mov    %eax,%eax
mov    (%rax),%rcx
and    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0x40,%eax
cltq
mov    (%rax),%rcx
and    %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESIntDisable>:
mov    %esi,%eax
shr    $0x10,%esi
not    %esi
or     $0xfffffff8,%esi
movslq %esi,%rcx
lea    -0x7fd0(%rdi),%edx
and    %rcx,(%rdx)
not    %eax
or     $0xffff0000,%eax
cltq
movslq %edi,%rcx
and    %rax,0x40(%rcx)
ret

LLVM IR (-O0):
define void @DESIntDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 458752
%7 = ashr i32 %6, 16
%8 = xor i32 %7, -1
%9 = sext i32 %8 to i64
%10 = load i32, i32* %3
%11 = add i32 %10, -32720
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = and i64 %14, %9
store volatile i64 %15, i64* %13
%16 = load i32, i32* %4
%17 = and i32 %16, 65535
%18 = xor i32 %17, -1
%19 = sext i32 %18 to i64
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 64
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i64*
%24 = load volatile i64, i64* %23
%25 = and i64 %24, %19
store volatile i64 %25, i64* %23
ret void
}

LLVM IR (-O2):
define void @DESIntDisable(i32 %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = and i32 %3, 7
%5 = xor i32 %4, -1
%6 = sext i32 %5 to i64
%7 = add i32 %0, -32720
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
%12 = and i32 %1, 65535
%13 = xor i32 %12, -1
%14 = sext i32 %13 to i64
%15 = add nsw i32 %0, 64
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
%19 = and i64 %18, %14
store volatile i64 %19, i64* %17
ret void
}
void g_direct_equal() {}


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

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

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

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

/* Variables and functions */
void *realloc(void *, size_t);
void *nativeRealloc(void *ptr, size_t newsize, uint32_t id) {
  void *addr = realloc(ptr, newsize);
  return addr;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @nativeRealloc(i8* nocapture %0, i64 %1, i32 %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %4
}
char __attribute__((regparm(1)))
touppercase_transform(unsigned int c, void *data) {
  if (c >= 'a' && c <= 'z')
    return c - 'a' + 'A';
  else
    return c;
}


x86 assembly (clang, -O0):
<touppercase_transform>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x61,-0x8(%rbp)
jb     1130 <touppercase_transform+0x30>
cmpl   $0x7a,-0x8(%rbp)
ja     1130 <touppercase_transform+0x30>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1136 <touppercase_transform+0x36>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<touppercase_transform>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%eax
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @touppercase_transform(i32 %0, i8* %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp uge i32 %6, 97
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp ule i32 %9, 122
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sub i32 %12, 97
%14 = add i32 %13, 65
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
br label %19
16: ; preds = %8, %2
%17 = load i32, i32* %4
%18 = trunc i32 %17 to i8
store i8 %18, i8* %3
br label %19
19: ; preds = %16, %11
%20 = load i8, i8* %3
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @touppercase_transform(i32 %0, i8* nocapture readnone %1) {
%3 = add i32 %0, -97
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, 224
%6 = select i1 %4, i32 %5, i32 %0
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ ansi_format(int);
int /*<<< orphan*/ printf(char *, char *, int, int, unsigned char);
void ansi_background(unsigned char color) {
  if (color >= 8) {
    printf("%s%d;%d;%dm", "\033[", 40 + 8, 5, color);
  } else {
    ansi_format(40 + color);
  }
}


x86 assembly (clang, -O0):
<ansi_background>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jl     1162 <ansi_background+0x42>
lea    0xebe(%rip),%rdi
lea    0xec3(%rip),%rsi
mov    $0x30,%edx
mov    $0x5,%ecx
movzbl -0x1(%rbp),%r8d
call   1030 <printf@plt>
jmp    116e <ansi_background+0x4e>
movzbl -0x1(%rbp),%edi
add    $0x28,%edi
call   1040 <ansi_format@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ansi_background>:
cmp    $0x8,%dil
jb     1147 <ansi_background+0x27>
movzbl %dil,%r8d
lea    0xecf(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x30,%edx
mov    $0x5,%ecx
jmp    1030 <printf@plt>
movzbl %dil,%edi
add    $0x28,%edi
jmp    1040 <ansi_format@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s%d;%d;%dm\00"
@.str.1 = [3 x i8] c"\1B[\00"
define void @ansi_background(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 8
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 48, i32 5, i8 zeroext %7)
br label %14
9: ; preds = %1
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = add nsw i32 40, %11
%13 = call i32 @ansi_format(i32 %12)
br label %14
14: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s%d;%d;%dm\00"
@.str.1 = [3 x i8] c"\1B[\00"
define void @ansi_background(i8 zeroext %0) {
%2 = icmp ugt i8 %0, 7
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 48, i32 5, i8 zeroext %0)
br label %9
5: ; preds = %1
%6 = zext i8 %0 to i32
%7 = add nuw nsw i32 %6, 40
%8 = tail call i32 @ansi_format(i32 %7)
br label %9
9: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_UART_SendCongestionString(int /*<<< orphan*/, char *);
void HaltDabort(void) {
  BSP_UART_SendCongestionString(0, "Dabort exception!!!\n\0");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<HaltDabort>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <BSP_UART_SendCongestionString@plt>
jmp    1122 <HaltDabort+0x12>

x86 assembly (clang, -O2):
<HaltDabort>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
call   1030 <BSP_UART_SendCongestionString@plt>
nop
jmp    1120 <HaltDabort+0x10>

LLVM IR (-O0):
@.str = [22 x i8] c"Dabort exception!!!\0A\00\00"
define void @HaltDabort() {
%1 = call i32 @BSP_UART_SendCongestionString(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [22 x i8] c"Dabort exception!!!\0A\00\00"
define void @HaltDabort() {
%1 = tail call i32 @BSP_UART_SendCongestionString(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) { printf("recv a sig=%d\n", sig); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"recv a sig=%d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
__attribute__((always_)) void __check_printsym_format(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @__check_printsym_format(i8* nocapture %0, ...) {
ret void
}
void PyDTrace_GC_START(int arg0) {}


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

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

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

LLVM IR (-O2):
define void @PyDTrace_GC_START(i32 %0) {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
scalar_t__ accept(int, struct sockaddr *, int *);
int main(int ac, char **av) {
  (void)ac;
  (void)av;
  int sockfd = 42;
  struct sockaddr addr;
  socklen_t addrlen = sizeof(addr);
  if (accept(sockfd, &addr, &addrlen) < 0)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2a,-0x14(%rbp)
movl   $0x4,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <accept@plt>
cmp    $0x0,%rax
jge    115a <main+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1161 <main+0x51>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x2a,%edi
call   1030 <accept@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.sockaddr
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
store i32 42, i32* %6
store i32 4, i32* %8
%11 = load i32, i32* %6
%12 = call i64 @accept(i32 %11, %struct.sockaddr* %7, i32* %8)
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 0, i32* %3
br label %16
15: ; preds = %2
store i32 1, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr
%4 = alloca i32
%5 = bitcast %struct.sockaddr* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 4, i32* %4
%7 = call i64 @accept(i32 42, %struct.sockaddr* %3, i32* %4)
%8 = lshr i64 %7, 63
%9 = trunc i64 %8 to i32
%10 = xor i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
int /*<<< orphan*/ printf(char *, int);
int sysconf(int /*<<< orphan*/);
int main(void) {
  int cpus = sysconf(_SC_NPROCESSORS_ONLN);
  printf("_SC_NPROCESSORS_ONLN: %d\n", cpus);
  return 0;
}


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

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

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

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
@.str = [26 x i8] c"_SC_NPROCESSORS_ONLN: %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i32 @sysconf(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int metil_mpi_recv(void *buf, int count, int src, int tag) { assert(0); }


x86 assembly (clang, -O0):
<metil_mpi_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @metil_mpi_recv(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = call i32 @assert(i32 0)
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @metil_mpi_recv(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @assert(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, int);
int /*<<< orphan*/ stderr;
void grace_error_exit(char *function_name, int line_number) {
  fprintf(stderr, "%s/%s(): Fatal error at line %d\n",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/timhriley/appaserver/refs/heads/master/"
          "library/grace.c",
          function_name, line_number);
  exit(1);
}


x86 assembly (clang, -O0):
<grace_error_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
lea    0xeb9(%rip),%rsi
lea    0xed3(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<grace_error_exit>:
push   %rax
mov    %esi,%r8d
mov    %rdi,%rcx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
lea    0xee3(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"%s/%s(): Fatal error at line %d\0A\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/timhriley/appaserver/refs/heads/master/library/grace.c\00"
define void @grace_error_exit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"%s/%s(): Fatal error at line %d\0A\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/timhriley/appaserver/refs/heads/master/library/grace.c\00"
define void @grace_error_exit(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ serial_device_disconnect(void *, char const *);
void serial_device_destroy(void *v, const char *caller) {
  serial_device_disconnect(v, caller);
  free(v);
}


x86 assembly (clang, -O0):
<serial_device_destroy>:
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   1040 <serial_device_disconnect@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_device_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <serial_device_disconnect@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @serial_device_destroy(i8* %0, i8* %1) {
%3 = tail call i32 @serial_device_disconnect(i8* %0, i8* %1)
%4 = tail call i32 @free(i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ min_char_or_byte2;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
unsigned get_XFontStruct_min_char_or_byte2(void *_p) {
  return (unsigned)((XFontStruct *)_p)->min_char_or_byte2;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_min_char_or_byte2>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XFontStruct_min_char_or_byte2(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int test_imm_B0uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xB0 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B0uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 176
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) { printf("%d\n", atoi(argv[1])); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
char *irc_html_to_irc(const char *const string) { return string; }


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

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

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

LLVM IR (-O2):
define i8* @irc_html_to_irc(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ uabs(long);
int /*<<< orphan*/ utoa(int /*<<< orphan*/, char *);
void itoa(long n, char *s) {
  if (n < 0) {
    *s++ = '-';
  }
  utoa(uabs(n), s);
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114d <itoa+0x2d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <uabs@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <utoa@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
jns    1130 <itoa+0x10>
movb   $0x2d,(%rbx)
add    $0x1,%rbx
call   1040 <uabs@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <utoa@plt>

LLVM IR (-O0):
define void @itoa(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
store i8 45, i8* %8
br label %10
10: ; preds = %7, %2
%11 = load i64, i64* %3
%12 = call i32 @uabs(i64 %11)
%13 = load i8*, i8** %4
%14 = call i32 @utoa(i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @itoa(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
br label %6
6: ; preds = %4, %2
%7 = phi i8* [ %5, %4 ], [ %1, %2 ]
%8 = tail call i32 @uabs(i64 %0)
%9 = tail call i32 @utoa(i32 %8, i8* %7)
ret void
}
/* Type definitions */
struct sd_locker_state_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ sd_locker_posix_lock_file_close(struct sd_locker_state_t *);
void sd_locker_lock_file_close(struct sd_locker_state_t *state) {
  assert(state != NULL);
  sd_locker_posix_lock_file_close(state);
}


x86 assembly (clang, -O0):
<sd_locker_lock_file_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <sd_locker_posix_lock_file_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_locker_lock_file_close>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <sd_locker_posix_lock_file_close@plt>

LLVM IR (-O0):
%struct.sd_locker_state_t = type { i32 }
define void @sd_locker_lock_file_close(%struct.sd_locker_state_t* %0) {
%2 = alloca %struct.sd_locker_state_t*
store %struct.sd_locker_state_t* %0, %struct.sd_locker_state_t** %2
%3 = load %struct.sd_locker_state_t*, %struct.sd_locker_state_t** %2
%4 = icmp ne %struct.sd_locker_state_t* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.sd_locker_state_t*, %struct.sd_locker_state_t** %2
%8 = call i32 @sd_locker_posix_lock_file_close(%struct.sd_locker_state_t* %7)
ret void
}

LLVM IR (-O2):
%struct.sd_locker_state_t = type { i32 }
define void @sd_locker_lock_file_close(%struct.sd_locker_state_t* %0) {
%2 = icmp ne %struct.sd_locker_state_t* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @sd_locker_posix_lock_file_close(%struct.sd_locker_state_t* %0)
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};
struct file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DRM_DEBUG(char *);
int drm_unblock(struct inode *inode, struct file *filp, unsigned int cmd,
                unsigned long arg) {
  DRM_DEBUG("\n");
  return 0;
}


x86 assembly (clang, -O0):
<drm_unblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <DRM_DEBUG@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.file = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_unblock(%struct.inode* %0, %struct.file* %1, i32 %2, i64 %3) {
%5 = alloca %struct.inode*
%6 = alloca %struct.file*
%7 = alloca i32
%8 = alloca i64
store %struct.inode* %0, %struct.inode** %5
store %struct.file* %1, %struct.file** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.file = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_unblock(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1, i32 %2, i64 %3) {
%5 = tail call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int raise() { return -1; }


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

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

LLVM IR (-O0):
define i32 @raise() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @raise() {
ret i32 -1
}
unsigned blargg_min(unsigned x, unsigned y) {
  if (y < x)
    x = y;
  return x;
}


x86 assembly (clang, -O0):
<blargg_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    111c <blargg_min+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blargg_min>:
mov    %edi,%eax
cmp    %edi,%esi
cmovb  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @blargg_min(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __be64_to_cpu(int /*<<< orphan*/ const);
uint64_t get64_be(const uint64_t *p) { return __be64_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<get64_be>:
mov    (%rdi),%edi
jmp    1030 <__be64_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @get64_be(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__be64_to_cpu(i32 %2)
ret i32 %3
}
void fc212(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
  a : {
    typedef int(*g)[n];
    0;
  };
    {
      typedef int(*h)[n];
      0;
    };
    goto a;
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc212>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc212+0x7>

x86 assembly (clang, -O2):
<fc212>:
jmp    1100 <fc212>

LLVM IR (-O0):
define void @fc212(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
br label %13
13: ; preds = %13, %1
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
br label %13
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc212(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ Test3();
void Test2() { Test3(); }


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

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

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

LLVM IR (-O2):
define void @Test2() {
%1 = tail call i32 (...) @Test3()
ret void
}
unsigned short port_word_in(unsigned short port) {
  unsigned short result;
  __asm__("in %%dx, %% ax" : "=a"(result) : "d"(port));
  return result;
}


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

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

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

LLVM IR (-O2):
define zeroext i16 @port_word_in(i16 zeroext %0) {
%2 = tail call i16 asm "in %dx, % ax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
/* Variables and functions */
double M_PI;
double vpradps_of_rpmpv(double vprpm) { return (30 / (vprpm * M_PI)); }


x86 assembly (clang, -O0):
<vpradps_of_rpmpv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm1
movsd  0xedf(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpradps_of_rpmpv>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xeed(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @vpradps_of_rpmpv(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = fdiv double 3.000000e+01, %5
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @vpradps_of_rpmpv(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fdiv double 3.000000e+01, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextln129(char const *, unsigned long, unsigned long);
void drawtextln(const char *s, unsigned long cfg, unsigned long cbg) {
  DrawTextln129(s, cfg, cbg);
}


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

x86 assembly (clang, -O2):
<drawtextln>:
jmp    1030 <DrawTextln129@plt>

LLVM IR (-O0):
define void @drawtextln(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 i32 @DrawTextln129(i8* %7, i64 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @drawtextln(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @DrawTextln129(i8* %0, i64 %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void main() { foo(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @foo()
ret void
}
void ECDSA_OpenSSL(void) {}


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

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

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

LLVM IR (-O2):
define void @ECDSA_OpenSSL() {
ret void
}
/* Variables and functions */
scalar_t__ TUNSETIFF;
unsigned long tunsetiff() { return (unsigned long)TUNSETIFF; }


x86 assembly (clang, -O0):
<tunsetiff>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tunsetiff>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@TUNSETIFF = global i64 0
define i64 @tunsetiff() {
%1 = load i64, i64* @TUNSETIFF
ret i64 %1
}

LLVM IR (-O2):
@TUNSETIFF = global i64 0
define i64 @tunsetiff() {
%1 = load i64, i64* @TUNSETIFF
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ fdump(char *, char *);
int main(int argc, char *argv[]) {
  if (argc > 2) {
    fdump(argv[1], argv[2]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1145 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <fdump@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x3,%edi
jl     1127 <main+0x17>
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <fdump@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @fdump(i8* %6, i8* %8)
br label %10
10: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int handle_scanned_votes();
int main(void) {
  bool ret;
  ret = handle_scanned_votes();
  if (ret) {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <handle_scanned_votes@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <main+0x36>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <handle_scanned_votes@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @handle_scanned_votes()
%2 = icmp eq i32 %1, 0
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void phaser_free(void *data) { free(data); }


x86 assembly (clang, -O0):
<phaser_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):
<phaser_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @phaser_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Screen;

/* Variables and functions */
unsigned int WidthOfScreen(int /*<<< orphan*/ *);
int xpos(Screen *s, unsigned int width) { return WidthOfScreen(s) - width - 2; }


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

x86 assembly (clang, -O2):
<xpos>:
push   %rbx
mov    %esi,%ebx
call   1030 <WidthOfScreen@plt>
sub    %ebx,%eax
add    $0xfffffffe,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @xpos(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @WidthOfScreen(i32* %5)
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
%9 = sub i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @xpos(i32* %0, i32 %1) {
%3 = tail call i32 @WidthOfScreen(i32* %0)
%4 = sub i32 -2, %1
%5 = add i32 %4, %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stbi__fopen(char const *, char *);
int stbi_is_hdr_from_file(int /*<<< orphan*/ *);
extern int stbi_is_hdr(char const *filename) {
  FILE *f = stbi__fopen(filename, "rb");
  int result = 0;
  if (f) {
    result = stbi_is_hdr_from_file(f);
    fclose(f);
  }
  return result;
}


x86 assembly (clang, -O0):
<stbi_is_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <stbi__fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <stbi_is_hdr+0x47>
mov    -0x10(%rbp),%rdi
call   1050 <stbi_is_hdr_from_file@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbi_is_hdr>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rsi
call   1040 <stbi__fopen@plt>
test   %rax,%rax
je     115d <stbi_is_hdr+0x2d>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <stbi_is_hdr_from_file@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
jmp    115f <stbi_is_hdr+0x2f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @stbi_is_hdr(i8* %0) {
%2 = tail call i32* @stbi__fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @stbi_is_hdr_from_file(i32* %2)
%6 = tail call i32 @fclose(i32* %2)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %8
}