xunge/DecIR huggingface dataset:
void removeLeftWall(int (*maze)[25], int startRow, int startCol) {
  int removeRow, removeCol;
  removeCol = ((startCol - 1) + 1) * 2;
  removeRow = (startRow)*2 - 1 + 2;
  maze[removeRow][removeCol] = 0;
}


x86 assembly (clang, -O0):
<removeLeftWall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeLeftWall>:
add    %edx,%edx
lea    (%rsi,%rsi,1),%eax
add    $0x1,%eax
cltq
movslq %edx,%rcx
imul   $0x64,%rax,%rax
add    %rdi,%rax
movl   $0x0,(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @removeLeftWall([25 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [25 x i32]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store [25 x i32]* %0, [25 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = add nsw i32 %10, 1
%12 = mul nsw i32 %11, 2
store i32 %12, i32* %8
%13 = load i32, i32* %5
%14 = mul nsw i32 %13, 2
%15 = sub nsw i32 %14, 1
%16 = add nsw i32 %15, 2
store i32 %16, i32* %7
%17 = load [25 x i32]*, [25 x i32]** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [25 x i32], [25 x i32]* %17, i64 %19
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [25 x i32], [25 x i32]* %20, i64 0, i64 %22
store i32 0, i32* %23
ret void
}

LLVM IR (-O2):
define void @removeLeftWall([25 x i32]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = shl nsw i32 %2, 1
%5 = shl nsw i32 %1, 1
%6 = or i32 %5, 1
%7 = sext i32 %6 to i64
%8 = sext i32 %4 to i64
%9 = getelementptr inbounds [25 x i32], [25 x i32]* %0, i64 %7, i64 %8
store i32 0, i32* %9
ret void
}
int sysfs_write(const char *path, unsigned char *buffer) {}


x86 assembly (clang, -O0):
<sysfs_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sysfs_write(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  int sock;
  if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_UDP)) != -1)
    return (EXIT_FAILURE);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
call   1030 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
je     115c <main+0x4c>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <main+0x58>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
call   1030 <socket@plt>
cmp    $0xffffffff,%eax
jne    113f <main+0x2f>
mov    0x2e8b(%rip),%rax
jmp    1146 <main+0x36>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@IPPROTO_UDP = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @AF_INET
%4 = load i32, i32* @SOCK_STREAM
%5 = load i32, i32* @IPPROTO_UDP
%6 = call i32 @socket(i32 %3, i32 %4, i32 %5)
store i32 %6, i32* %2
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load i32, i32* @EXIT_FAILURE
store i32 %9, i32* %1
br label %12
10: ; preds = %0
%11 = load i32, i32* @EXIT_SUCCESS
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@IPPROTO_UDP = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = load i32, i32* @IPPROTO_UDP
%4 = tail call i32 @socket(i32 %1, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @EXIT_SUCCESS
%7 = load i32, i32* @EXIT_FAILURE
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int f202(int *);
int f203(int *p) { return f202(p); }


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

x86 assembly (clang, -O2):
<f203>:
jmp    1030 <f202@plt>

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

LLVM IR (-O2):
define i32 @f203(i32* %0) {
%2 = tail call i32 @f202(i32* %0)
ret i32 %2
}
void CloseDebugLog() {}


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

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

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

LLVM IR (-O2):
define void @CloseDebugLog() {
ret void
}
int test_imm_47int32_reg(int val) { return ((val) & (0x47 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_47int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x47,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_47int32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 71
%5 = icmp ne i32 %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_47int32_reg(i32 %0) {
%2 = and i32 %0, 71
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int value1, value2, sum;
  value1 = 50;
  value2 = 25;
  sum = value1 + value2;
  printf("The sum of %i and %i is %i", value1, value2, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
movl   $0x19,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"The sum of %i and %i is %i\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 50, i32* %2
store i32 25, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"The sum of %i and %i is %i\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 50, i32 25, i32 75)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void PWMSyncUpdate(unsigned long ulBase, unsigned long ulGenBits) {
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  DEBUG_ASSERT(
      !(ulGenBits & ~(0x00000001 | 0x00000002 | 0x00000004 | 0x00000008)));
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ulGenBits;
}


x86 assembly (clang, -O0):
<PWMSyncUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     1141 <PWMSyncUpdate+0x31>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
and    $0xfffffffffffffff0,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMSyncUpdate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x10,%r14
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @PWMSyncUpdate(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 = icmp eq i64 %5, 1073905664
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1073909760
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = and i64 %14, -16
%16 = icmp ne i64 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = call i32 @DEBUG_ASSERT(i32 %18)
%20 = load i64, i64* %4
%21 = load i64, i64* %3
%22 = add i64 %21, 0
%23 = inttoptr i64 %22 to i64*
store volatile i64 %20, i64* %23
ret void
}

LLVM IR (-O2):
define void @PWMSyncUpdate(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ult i64 %1, 16
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = inttoptr i64 %0 to i64*
store volatile i64 %1, i64* %10
ret void
}
void gtk_button_box_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_box_get_type() {
ret void
}
void foo687() {}


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

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

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

LLVM IR (-O2):
define void @foo687() {
ret void
}
/* Variables and functions */
unsigned long pcibios_read_config_dword(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ print_debug_hex32(unsigned long);
void main(void) {
  unsigned long htic;
  htic = pcibios_read_config_dword(0, 0xc0, 0x6c);
  print_debug_hex32(htic);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0xc0,%esi
mov    $0x6c,%edx
call   1040 <pcibios_read_config_dword@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_debug_hex32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0xc0,%esi
mov    $0x6c,%edx
call   1040 <pcibios_read_config_dword@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <print_debug_hex32@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i64
%2 = call i64 @pcibios_read_config_dword(i32 0, i32 192, i32 108)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @print_debug_hex32(i64 %3)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 @pcibios_read_config_dword(i32 0, i32 192, i32 108)
%2 = tail call i32 @print_debug_hex32(i64 %1)
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void cleanuptcp(int fd, struct addrinfo *ai) {
  if (fd >= 0) {
    close(fd);
  }
  if (ai) {
    freeaddrinfo(ai);
  }
}


x86 assembly (clang, -O0):
<cleanuptcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1141 <cleanuptcp+0x21>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmpq   $0x0,-0x10(%rbp)
je     1155 <cleanuptcp+0x35>
mov    -0x10(%rbp),%rdi
call   1040 <freeaddrinfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanuptcp>:
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
js     112d <cleanuptcp+0xd>
call   1030 <close@plt>
test   %rbx,%rbx
je     113b <cleanuptcp+0x1b>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <freeaddrinfo@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @cleanuptcp(i32 %0, %struct.addrinfo* %1) {
%3 = alloca i32
%4 = alloca %struct.addrinfo*
store i32 %0, i32* %3
store %struct.addrinfo* %1, %struct.addrinfo** %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @close(i32 %8)
br label %10
10: ; preds = %7, %2
%11 = load %struct.addrinfo*, %struct.addrinfo** %4
%12 = icmp ne %struct.addrinfo* %11, null
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load %struct.addrinfo*, %struct.addrinfo** %4
%15 = call i32 @freeaddrinfo(%struct.addrinfo* %14)
br label %16
16: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @cleanuptcp(i32 %0, %struct.addrinfo* %1) {
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %4, %2
%7 = icmp eq %struct.addrinfo* %1, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @freeaddrinfo(%struct.addrinfo* %1)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PCMPGTW(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x65);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PCMPGTW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x65,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PCMPGTW>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x65,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PCMPGTW(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 101)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PCMPGTW(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 101)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
/* Variables and functions */
float get_float(int /*<<< orphan*/ *);
float GetFloat(void) { return get_float(NULL); }


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

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

LLVM IR (-O0):
define float @GetFloat() {
%1 = call float @get_float(i32* null)
ret float %1
}

LLVM IR (-O2):
define float @GetFloat() {
%1 = tail call float @get_float(i32* null)
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ ParamWrite(int, int);
void init_app_adt7410() {
  ParamWrite(0x0000, 0x007C);
  ParamWrite(0x0001, 0x0000);
  ParamWrite(0x0002, 0x000A);
  ParamWrite(0x0003, 0x001E);
  ParamWrite(0x0004, 0x5DC0);
}


x86 assembly (clang, -O0):
<init_app_adt7410>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x7c,%esi
call   1030 <ParamWrite@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x2,%edi
mov    $0xa,%esi
call   1030 <ParamWrite@plt>
mov    $0x3,%edi
mov    $0x1e,%esi
call   1030 <ParamWrite@plt>
mov    $0x4,%edi
mov    $0x5dc0,%esi
call   1030 <ParamWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_app_adt7410>:
push   %rax
xor    %edi,%edi
mov    $0x7c,%esi
call   1030 <ParamWrite@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x2,%edi
mov    $0xa,%esi
call   1030 <ParamWrite@plt>
mov    $0x3,%edi
mov    $0x1e,%esi
call   1030 <ParamWrite@plt>
mov    $0x4,%edi
mov    $0x5dc0,%esi
pop    %rax
jmp    1030 <ParamWrite@plt>

LLVM IR (-O0):
define void @init_app_adt7410() {
%1 = call i32 @ParamWrite(i32 0, i32 124)
%2 = call i32 @ParamWrite(i32 1, i32 0)
%3 = call i32 @ParamWrite(i32 2, i32 10)
%4 = call i32 @ParamWrite(i32 3, i32 30)
%5 = call i32 @ParamWrite(i32 4, i32 24000)
ret void
}

LLVM IR (-O2):
define void @init_app_adt7410() {
%1 = tail call i32 @ParamWrite(i32 0, i32 124)
%2 = tail call i32 @ParamWrite(i32 1, i32 0)
%3 = tail call i32 @ParamWrite(i32 2, i32 10)
%4 = tail call i32 @ParamWrite(i32 3, i32 30)
%5 = tail call i32 @ParamWrite(i32 4, i32 24000)
ret void
}
void ff_hevc_put_hevc_uni_epel_hv48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv48_10_sse4() {
ret void
}
fn3(dpy, winInfo, visrgn) struct _XDisplay *dpy;
{
  int b = fn1(0, winInfo);
  fn4(0, 0, visrgn);
}


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

x86 assembly (clang, -O2):
<fn3>:
push   %rbx
mov    %edx,%ebx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <fn1@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <fn4@plt>

LLVM IR (-O0):
%struct._XDisplay = type opaque
define i32 @fn3(%struct._XDisplay* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct._XDisplay*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct._XDisplay* %0, %struct._XDisplay** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @fn1 to i32 (i32, i32, ...)*)(i32 0, i32 %9)
store i32 %10, i32* %8
%11 = load i32, i32* %7
%12 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @fn4 to i32 (i32, i32, i32, ...)*)(i32 0, i32 0, i32 %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
%struct._XDisplay = type opaque
define i32 @fn3(%struct._XDisplay* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @fn1 to i32 (i32, i32, ...)*)(i32 0, i32 %1)
%5 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @fn4 to i32 (i32, i32, i32, ...)*)(i32 0, i32 0, i32 %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ OUT(int, int);
void spiReady(void) { OUT(0x01, (1 << 0)); }


x86 assembly (clang, -O0):
<spiReady>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <OUT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spiReady>:
mov    $0x1,%edi
mov    $0x1,%esi
jmp    1030 <OUT@plt>

LLVM IR (-O0):
define void @spiReady() {
%1 = call i32 @OUT(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @spiReady() {
%1 = tail call i32 @OUT(i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ pthread_setname_np(int /*<<< orphan*/, char const *);
void ksThread_SetName(const char *name) {
  pthread_setname_np(pthread_self(), name);
}


x86 assembly (clang, -O0):
<ksThread_SetName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <pthread_setname_np@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ksThread_SetName>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <pthread_setname_np@plt>

LLVM IR (-O0):
define void @ksThread_SetName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = load i8*, i8** %2
%5 = call i32 @pthread_setname_np(i32 %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @ksThread_SetName(i8* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @pthread_setname_np(i32 %2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ openlog(char *, int, int);
char *strrchr(char *, char);
void log_init(int *argc, char ***argv, int logopt, int logfac) {
  char *progname;
  progname = (progname = strrchr((*argv)[0], '/')) ? progname + 1 : (*argv)[0];
  openlog(progname, logopt, logfac);
}


x86 assembly (clang, -O0):
<log_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1169 <log_init+0x49>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1177 <log_init+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <openlog@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_init>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    (%rsi),%rax
mov    (%rax),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdi
test   %rax,%rax
cmove  %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <openlog@plt>

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

LLVM IR (-O2):
define void @log_init(i32* nocapture readnone %0, i8*** nocapture %1, i32 %2, i32 %3) {
%5 = load i8**, i8*** %1
%6 = load i8*, i8** %5
%7 = tail call i8* @strrchr(i8* dereferenceable(1) %6, i8 signext 47)
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %6, i8* %9
%11 = tail call i32 @openlog(i8* %10, i32 %2, i32 %3)
ret void
}
/* Type definitions */
struct initrec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clearts(struct initrec *);
int /*<<< orphan*/ stop(struct initrec *);
void dorestart(struct initrec *p) {
  clearts(p);
  stop(p);
}


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

x86 assembly (clang, -O2):
<dorestart>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clearts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <stop@plt>

LLVM IR (-O0):
%struct.initrec = type { i32 }
define void @dorestart(%struct.initrec* %0) {
%2 = alloca %struct.initrec*
store %struct.initrec* %0, %struct.initrec** %2
%3 = load %struct.initrec*, %struct.initrec** %2
%4 = call i32 @clearts(%struct.initrec* %3)
%5 = load %struct.initrec*, %struct.initrec** %2
%6 = call i32 @stop(%struct.initrec* %5)
ret void
}

LLVM IR (-O2):
%struct.initrec = type { i32 }
define void @dorestart(%struct.initrec* %0) {
%2 = tail call i32 @clearts(%struct.initrec* %0)
%3 = tail call i32 @stop(%struct.initrec* %0)
ret void
}
/* Variables and functions */
int mem_peek(int);
int /*<<< orphan*/ mem_poke(int, int);
void vdrive_clear_attention() { mem_poke(0xDD00, mem_peek(0xDD00) & ~0x08); }


x86 assembly (clang, -O0):
<vdrive_clear_attention>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdd00,%edi
call   1030 <mem_peek@plt>
mov    %eax,%esi
and    $0xfffffff7,%esi
mov    $0xdd00,%edi
call   1040 <mem_poke@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdrive_clear_attention>:
push   %rax
mov    $0xdd00,%edi
call   1030 <mem_peek@plt>
and    $0xfffffff7,%eax
mov    $0xdd00,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <mem_poke@plt>

LLVM IR (-O0):
define void @vdrive_clear_attention() {
%1 = call i32 @mem_peek(i32 56576)
%2 = and i32 %1, -9
%3 = call i32 @mem_poke(i32 56576, i32 %2)
ret void
}

LLVM IR (-O2):
define void @vdrive_clear_attention() {
%1 = tail call i32 @mem_peek(i32 56576)
%2 = and i32 %1, -9
%3 = tail call i32 @mem_poke(i32 56576, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void press_ret(void) {
  printf("[return]");
  getchar();
}


x86 assembly (clang, -O0):
<press_ret>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<press_ret>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"[return]\00"
define void @press_ret() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"[return]\00"
define void @press_ret() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int new_connection(int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ write_to_descriptor(int, char *);
void wave(int sock, char *text) {
  int s;
  if ((s = new_connection(sock)) < 0)
    return;
  write_to_descriptor(s, text);
  sleep(6);
  close(s);
}


x86 assembly (clang, -O0):
<wave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <new_connection@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1168 <wave+0x28>
jmp    1186 <wave+0x46>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <write_to_descriptor@plt>
mov    $0x6,%edi
call   1060 <sleep@plt>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <new_connection@plt>
test   %eax,%eax
js     1174 <wave+0x34>
mov    %eax,%ebx
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <write_to_descriptor@plt>
mov    $0x6,%edi
call   1060 <sleep@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <close@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @wave(i32 %0, i8* %1) {
%3 = tail call i32 @new_connection(i32 %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @write_to_descriptor(i32 %3, i8* %1)
%7 = tail call i32 @sleep(i32 6)
%8 = tail call i32 @close(i32 %3)
br label %9
9: ; preds = %2, %5
ret void
}
int hash(description)
char *description;
{
  int sum, i;
  sum = 0;
  for (i = 0; description[i] != '\0'; ++i)
    sum = sum + description[i];
  return (sum % 53);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114d <hash+0x4d>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash+0x16>
mov    -0xc(%rbp),%eax
mov    $0x35,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     113d <hash+0x3d>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movslq %ecx,%rax
imul   $0x4d4873ed,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x35,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %22, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %25
13: ; preds = %5
%14 = load i32, i32* %3
%15 = load i8*, i8** %2
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %14, %20
store i32 %21, i32* %3
br label %22
22: ; preds = %13
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %5
25: ; preds = %5
%26 = load i32, i32* %3
%27 = srem i32 %26, 53
ret i32 %27
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8 [ %12, %4 ], [ %2, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add nsw i32 %7, %8
%10 = add nuw nsw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %9, 53
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
void do_preload_rhash(int r) {}


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

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

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

LLVM IR (-O2):
define void @do_preload_rhash(i32 %0) {
ret void
}
int PDC_get_attribute(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @PDC_get_attribute() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int int64_t;

/* Variables and functions */
int64_t FastAbs(int64_t a) {
  int64_t mask = (a >> (sizeof(uint64_t) * 8 - 1));
  return (a + mask) ^ mask;
}


x86 assembly (clang, -O0):
<FastAbs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastAbs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @FastAbs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 31
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = xor i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @FastAbs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int glutStrokeWidth(void *font, int character) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @glutStrokeWidth(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int twin_ucs_page(uint32_t ucs4) { return ucs4 >> 7; }


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

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

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

LLVM IR (-O2):
define i32 @twin_ucs_page(i32 %0) {
%2 = ashr i32 %0, 7
ret i32 %2
}
int brk(void *end_data_segment) {
  int ret = 0;
  asm("movl $45, %%eax   \n\t"
      "movl %1, %%ebx  \n\t"
      "int $0x80		\n\t"
      "movl %%eax,%0  \n\t"
      : "=r"(ret)
      : "m"(end_data_segment));
}


x86 assembly (clang, -O0):
<brk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x2d,%eax
mov    -0x10(%rbp),%ebx
int    $0x80
mov    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk>:
mov    %rdi,-0x8(%rsp)
mov    $0x2d,%eax
mov    -0x8(%rsp),%ebx
int    $0x80
mov    %eax,%eax
ret

LLVM IR (-O0):
define i32 @brk(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = call i32 asm "movl $$45, %eax \0A\09movl $1, %ebx \0A\09int $$0x80\09\09\0A\09movl %eax,$0 \0A\09", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %3)
store i32 %5, i32* %4
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @brk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 asm "movl $$45, %eax \0A\09movl $1, %ebx \0A\09int $$0x80\09\09\0A\09movl %eax,$0 \0A\09", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_copy();
int /*<<< orphan*/ test_has();
int /*<<< orphan*/ test_indexof();
int /*<<< orphan*/ test_insert();
int /*<<< orphan*/ test_isempty();
int /*<<< orphan*/ test_lookup();
int /*<<< orphan*/ test_remove();
int /*<<< orphan*/ test_size();
int main() {
  test_insert();
  test_remove();
  test_copy();
  test_isempty();
  test_size();
  test_indexof();
  test_has();
  test_lookup();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <test_insert@plt>
mov    $0x0,%al
call   1090 <test_remove@plt>
mov    $0x0,%al
call   1030 <test_copy@plt>
mov    $0x0,%al
call   1060 <test_isempty@plt>
mov    $0x0,%al
call   1040 <test_size@plt>
mov    $0x0,%al
call   1070 <test_indexof@plt>
mov    $0x0,%al
call   1050 <test_has@plt>
mov    $0x0,%al
call   1080 <test_lookup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10a0 <test_insert@plt>
xor    %eax,%eax
call   1090 <test_remove@plt>
xor    %eax,%eax
call   1030 <test_copy@plt>
xor    %eax,%eax
call   1060 <test_isempty@plt>
xor    %eax,%eax
call   1040 <test_size@plt>
xor    %eax,%eax
call   1070 <test_indexof@plt>
xor    %eax,%eax
call   1050 <test_has@plt>
xor    %eax,%eax
call   1080 <test_lookup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_insert()
%3 = call i32 (...) @test_remove()
%4 = call i32 (...) @test_copy()
%5 = call i32 (...) @test_isempty()
%6 = call i32 (...) @test_size()
%7 = call i32 (...) @test_indexof()
%8 = call i32 (...) @test_has()
%9 = call i32 (...) @test_lookup()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_insert()
%2 = tail call i32 (...) @test_remove()
%3 = tail call i32 (...) @test_copy()
%4 = tail call i32 (...) @test_isempty()
%5 = tail call i32 (...) @test_size()
%6 = tail call i32 (...) @test_indexof()
%7 = tail call i32 (...) @test_has()
%8 = tail call i32 (...) @test_lookup()
ret i32 0
}
int cSunMiscSignal_atomicCompareAndSwap_int(volatile int *const ptr,
                                            int const oldval,
                                            int const newval) {
  return __sync_val_compare_and_swap(ptr, oldval, newval);
}


x86 assembly (clang, -O0):
<cSunMiscSignal_atomicCompareAndSwap_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
pop    %rbp
ret

x86 assembly (clang, -O2):
<cSunMiscSignal_atomicCompareAndSwap_int>:
mov    %esi,%eax
lock cmpxchg %edx,(%rdi)
ret

LLVM IR (-O0):
define i32 @cSunMiscSignal_atomicCompareAndSwap_int(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = cmpxchg i32* %7, i32 %8, i32 %9 seq_cst seq_cst
%11 = extractvalue { i32, i1 } %10, 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @cSunMiscSignal_atomicCompareAndSwap_int(i32* nocapture %0, i32 %1, i32 %2) {
%4 = cmpxchg i32* %0, i32 %1, i32 %2 seq_cst seq_cst
%5 = extractvalue { i32, i1 } %4, 0
ret i32 %5
}
char *langRomTypeExtRam16() { return "16kB External RAM"; }


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

x86 assembly (clang, -O2):
<langRomTypeExtRam16>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"16kB External RAM\00"
define i8* @langRomTypeExtRam16() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"16kB External RAM\00"
define i8* @langRomTypeExtRam16() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
int sys$connect(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(2), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$connect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x2,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$connect>:
mov    $0x2,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$connect"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 2, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$connect"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 2, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void XOR_HOST_REG_L(int dst_reg, int src_reg) {
  addbyte(0x31);
  addbyte(0xc0 | dst_reg | (src_reg << 3));
}


x86 assembly (clang, -O0):
<XOR_HOST_REG_L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x31,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XOR_HOST_REG_L>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x31,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @XOR_HOST_REG_L(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 49)
%6 = load i32, i32* %3
%7 = or i32 192, %6
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 %7, %9
%11 = call i32 @addbyte(i32 %10)
ret void
}

LLVM IR (-O2):
define void @XOR_HOST_REG_L(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 49)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ returntest();
uint32_t test() { return returntest(); }


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

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

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

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @returntest()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ byteToHex(unsigned char, char *);
char *cloneString(char *);
char *byteToHexString(unsigned char n) {
  char hex[3];
  byteToHex(n, hex);
  hex[2] = 0;
  return cloneString(hex);
}


x86 assembly (clang, -O0):
<byteToHexString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
lea    -0x4(%rbp),%rsi
movzbl %al,%edi
call   1040 <byteToHex@plt>
movb   $0x0,-0x2(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <cloneString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteToHexString>:
push   %rbx
sub    $0x10,%rsp
lea    0xd(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <byteToHex@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
call   1030 <cloneString@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @byteToHexString(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca [3 x i8]
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%6 = call i32 @byteToHex(i8 zeroext %4, i8* %5)
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%9 = call i8* @cloneString(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @byteToHexString(i8 zeroext %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @byteToHex(i8 zeroext %0, i8* %3)
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 0, i8* %5
%6 = call i8* @cloneString(i8* %3)
ret i8* %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XMapEvent;

/* Variables and functions */
void *get_XMapEvent_display(void *_p) {
  return (void *)((XMapEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XMapEvent_display(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 i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XMapEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void myfree(void *ptr) {
  if (ptr)
    free(ptr);
}


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

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

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

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