xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned char const uint32_t;

/* Variables and functions */
uint32_t read24(const unsigned char *base) {
  return base[0] | (base[1] << 8) | (base[2] << 16);
}


x86 assembly (clang, -O0):
<read24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read24>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @read24(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @read24(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Type definitions */
struct udma_rflow {
  int dummy;
};
struct udma_dev {
  int dummy;
};

/* Variables and functions */
struct udma_rflow *__udma_get_rflow(struct udma_dev *, int);
struct udma_rflow *xudma_rflow_get(struct udma_dev *ud, int id) {
  return __udma_get_rflow(ud, id);
}


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

x86 assembly (clang, -O2):
<xudma_rflow_get>:
jmp    1030 <__udma_get_rflow@plt>

LLVM IR (-O0):
%struct.udma_rflow = type { i32 }
%struct.udma_dev = type { i32 }
define %struct.udma_rflow* @xudma_rflow_get(%struct.udma_dev* %0, i32 %1) {
%3 = alloca %struct.udma_dev*
%4 = alloca i32
store %struct.udma_dev* %0, %struct.udma_dev** %3
store i32 %1, i32* %4
%5 = load %struct.udma_dev*, %struct.udma_dev** %3
%6 = load i32, i32* %4
%7 = call %struct.udma_rflow* @__udma_get_rflow(%struct.udma_dev* %5, i32 %6)
ret %struct.udma_rflow* %7
}

LLVM IR (-O2):
%struct.udma_rflow = type { i32 }
%struct.udma_dev = type { i32 }
define %struct.udma_rflow* @xudma_rflow_get(%struct.udma_dev* %0, i32 %1) {
%3 = tail call %struct.udma_rflow* @__udma_get_rflow(%struct.udma_dev* %0, i32 %1)
ret %struct.udma_rflow* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("usage:  privateim --ip IP_ADDRESS --port PORT_NUM\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"usage: privateim --ip IP_ADDRESS --port PORT_NUM\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [50 x i8] c"usage: privateim --ip IP_ADDRESS --port PORT_NUM\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pong_test(int, int, int /*<<< orphan*/);
void pong_test_500K_0(void) { pong_test(0x00, 0x1c, 0); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x1c,%esi
mov    %edx,%edi
call   1030 <pong_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %edi,%edi
mov    $0x1c,%esi
xor    %edx,%edx
jmp    1030 <pong_test@plt>

LLVM IR (-O0):
define void @pong_test_500K_0() {
%1 = call i32 @pong_test(i32 0, i32 28, i32 0)
ret void
}

LLVM IR (-O2):
define void @pong_test_500K_0() {
%1 = tail call i32 @pong_test(i32 0, i32 28, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int b;
  for (b = 1; b <= 255; b++) {
    printf("%d  ", b);
    printf("%c\n", b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     115f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x1,%ebx
lea    0xedf(%rip),%r14
lea    0xedd(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define i32 @init_Memory() {
ret i32 0
}
int do_154() { return 154; }


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

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

LLVM IR (-O0):
define i32 @do_154() {
ret i32 154
}

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

/* Variables and functions */
void set_chain_addr(uint32_t addr[8], uint32_t chain) { addr[5] = chain; }


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

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

LLVM IR (-O0):
define void @set_chain_addr(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 = getelementptr inbounds i32, i32* %6, i64 5
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_chain_addr(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int /*<<< orphan*/);
int main() {
  if (foo(0) != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <foo@plt>
cmp    $0x1,%eax
je     1146 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <foo@plt>
cmp    $0x1,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int get_action(char *action) {
  if (strcmp(action, "BLOCK") == 0) {
    return 0;
  } else if (strcmp(action, "UNBLOCK") == 0) {
    return 1;
  }
}


x86 assembly (clang, -O0):
<get_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xedb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <get_action+0x32>
movl   $0x0,-0x4(%rbp)
jmp    116d <get_action+0x5d>
mov    -0x10(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <get_action+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116d <get_action+0x5d>
jmp    116d <get_action+0x5d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_action>:
push   %rbx
mov    %rdi,%rbx
lea    0xee7(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     113b <get_action+0x2b>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"BLOCK\00"
@.str.1 = [8 x i8] c"UNBLOCK\00"
define i32 @get_action(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ 0, %1 ], [ 1, %4 ]
ret i32 %7
}
int exynos5_bus_mif_update(struct exynos5_bus_mif_handle *handle,
                           unsigned long min_freq) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.exynos5_bus_mif_handle = type opaque
define i32 @exynos5_bus_mif_update(%struct.exynos5_bus_mif_handle* %0, i64 %1) {
%3 = alloca %struct.exynos5_bus_mif_handle*
%4 = alloca i64
store %struct.exynos5_bus_mif_handle* %0, %struct.exynos5_bus_mif_handle** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
%struct.exynos5_bus_mif_handle = type opaque
define i32 @exynos5_bus_mif_update(%struct.exynos5_bus_mif_handle* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Type definitions */
struct spaceSaver {
  int dummy;
};
struct spaceRange {
  int dummy;
};
struct spaceNode {
  int dummy;
};

/* Variables and functions */
struct spaceNode *spaceSaverAddOverflowMultiOptionalPadding(struct spaceSaver *,
                                                            struct spaceRange *,
                                                            struct spaceNode *,
                                                            int, int);
struct spaceNode *spaceSaverAddOverflowMulti(struct spaceSaver *ss,
                                             struct spaceRange *rangeList,
                                             struct spaceNode *nodeList,
                                             int allowOverflow) {
  return spaceSaverAddOverflowMultiOptionalPadding(ss, rangeList, nodeList,
                                                   allowOverflow, 1);
}


x86 assembly (clang, -O0):
<spaceSaverAddOverflowMulti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <spaceSaverAddOverflowMultiOptionalPadding@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaceSaverAddOverflowMulti>:
mov    $0x1,%r8d
jmp    1030 <spaceSaverAddOverflowMultiOptionalPadding@plt>

LLVM IR (-O0):
%struct.spaceSaver = type { i32 }
%struct.spaceRange = type { i32 }
%struct.spaceNode = type { i32 }
define %struct.spaceNode* @spaceSaverAddOverflowMulti(%struct.spaceSaver* %0, %struct.spaceRange* %1, %struct.spaceNode* %2, i32 %3) {
%5 = alloca %struct.spaceSaver*
%6 = alloca %struct.spaceRange*
%7 = alloca %struct.spaceNode*
%8 = alloca i32
store %struct.spaceSaver* %0, %struct.spaceSaver** %5
store %struct.spaceRange* %1, %struct.spaceRange** %6
store %struct.spaceNode* %2, %struct.spaceNode** %7
store i32 %3, i32* %8
%9 = load %struct.spaceSaver*, %struct.spaceSaver** %5
%10 = load %struct.spaceRange*, %struct.spaceRange** %6
%11 = load %struct.spaceNode*, %struct.spaceNode** %7
%12 = load i32, i32* %8
%13 = call %struct.spaceNode* @spaceSaverAddOverflowMultiOptionalPadding(%struct.spaceSaver* %9, %struct.spaceRange* %10, %struct.spaceNode* %11, i32 %12, i32 1)
ret %struct.spaceNode* %13
}

LLVM IR (-O2):
%struct.spaceSaver = type { i32 }
%struct.spaceRange = type { i32 }
%struct.spaceNode = type { i32 }
define %struct.spaceNode* @spaceSaverAddOverflowMulti(%struct.spaceSaver* %0, %struct.spaceRange* %1, %struct.spaceNode* %2, i32 %3) {
%5 = tail call %struct.spaceNode* @spaceSaverAddOverflowMultiOptionalPadding(%struct.spaceSaver* %0, %struct.spaceRange* %1, %struct.spaceNode* %2, i32 %3, i32 1)
ret %struct.spaceNode* %5
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ IPV6_ADDRFORM;
int diminuto_ipc_set_socket(int, int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int diminuto_ipc6_datagram_set_ipv6toipv4(int fd) {
  return diminuto_ipc_set_socket(fd, IPPROTO_UDP, IPV6_ADDRFORM, AF_INET);
}


x86 assembly (clang, -O0):
<diminuto_ipc6_datagram_set_ipv6toipv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
call   1030 <diminuto_ipc_set_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipc6_datagram_set_ipv6toipv4>:
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <diminuto_ipc_set_socket@plt>

LLVM IR (-O0):
@IPPROTO_UDP = global i32 0
@IPV6_ADDRFORM = global i32 0
@AF_INET = global i32 0
define i32 @diminuto_ipc6_datagram_set_ipv6toipv4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IPPROTO_UDP
%5 = load i32, i32* @IPV6_ADDRFORM
%6 = load i32, i32* @AF_INET
%7 = call i32 @diminuto_ipc_set_socket(i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@IPPROTO_UDP = global i32 0
@IPV6_ADDRFORM = global i32 0
@AF_INET = global i32 0
define i32 @diminuto_ipc6_datagram_set_ipv6toipv4(i32 %0) {
%2 = load i32, i32* @IPPROTO_UDP
%3 = load i32, i32* @IPV6_ADDRFORM
%4 = load i32, i32* @AF_INET
%5 = tail call i32 @diminuto_ipc_set_socket(i32 %0, i32 %2, i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int main() {
  char c = 'a';
  int i = 97;
  printf("character = %c, ASCII code = %d\n", c, i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x61,-0xc(%rbp)
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
lea    0xec9(%rip),%rdi
movsbl %al,%esi
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    $0x61,%esi
mov    $0x61,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"character = %c, ASCII code = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8 signext 97, i32 97)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_RFM_RXD_INPUT() { clear_io_bit(0x39, 2); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RFM_RXD_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
mov    $0x2,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RFM_RXD_INPUT>:
mov    $0x39,%edi
mov    $0x2,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RFM_RXD_INPUT() {
%1 = call i32 @clear_io_bit(i32 57, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RFM_RXD_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 57, i32 2)
ret void
}
void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi) {}


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

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.rt2x00_dev = type opaque
define void @rt2x00leds_led_quality(%struct.rt2x00_dev* %0, i32 %1) {
%3 = alloca %struct.rt2x00_dev*
%4 = alloca i32
store %struct.rt2x00_dev* %0, %struct.rt2x00_dev** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
define void @rt2x00leds_led_quality(%struct.rt2x00_dev* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void version() {
  puts("rwpcd  ->  random wallpaper changer daemon");
  puts("version 2.0");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"rwpcd -> random wallpaper changer daemon\00"
@.str.1 = [12 x i8] c"version 2.0\00"
define void @version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"rwpcd -> random wallpaper changer daemon\00"
@.str.1 = [12 x i8] c"version 2.0\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *tf(void *a) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @tf(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
int create(void *opaque) {
  assert(opaque);
  return 0;
}


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

x86 assembly (clang, -O2):
<create>:
push   %rax
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @create(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
ret i32 0
}
int ar2315_init_devices(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ar2315_init_devices() {
ret i32 0
}
/* Variables and functions */
void stub1(long long);
void testClosureJrV(void (*closure)(long long), long long a1) {
  if (closure != NULL)
    (*closure)(a1);
}


x86 assembly (clang, -O0):
<testClosureJrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1125 <testClosureJrV+0x25>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureJrV>:
test   %rdi,%rdi
je     110d <testClosureJrV+0xd>
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax
ret

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

LLVM IR (-O2):
define void @testClosureJrV(void (i64)* %0, i64 %1) {
%3 = icmp eq void (i64)* %0, null
br i1 %3, label %5, label %4
4: ; preds = %2
tail call void %0(i64 %1)
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hash_table_test();
int /*<<< orphan*/ printf(char *);
int main() {
  hash_table_test();
  printf("hash table test OK!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <hash_table_test@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"hash table test OK!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hash_table_test()
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"hash table test OK!\00"
define i32 @main() {
%1 = tail call i32 (...) @hash_table_test()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int mDB_delete(fn, idx, key) { return mDBi_msg('d', fn, idx, 0, key, 0, 0, 0); }


x86 assembly (clang, -O0):
<mDB_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0x64,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
mov    $0x0,%al
call   1030 <mDBi_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDB_delete>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
mov    %edi,%esi
mov    $0x64,%edi
xor    %ecx,%ecx
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
call   1030 <mDBi_msg@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mDB_delete(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 = call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 100, i32 %7, i32 %8, i32 0, i32 %9, i32 0, i32 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mDB_delete(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 100, i32 %0, i32 %1, i32 0, i32 %2, i32 0, i32 0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("usage: %s gribfile\n", prog);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"usage: %s gribfile\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"usage: %s gribfile\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ alignbits();
int /*<<< orphan*/ putbits(int, int);
void putseqend(void) {
  {
    alignbits();
    putbits(439, 32);
    return;
  }
}


x86 assembly (clang, -O0):
<putseqend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <alignbits@plt>
mov    $0x1b7,%edi
mov    $0x20,%esi
call   1040 <putbits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<putseqend>:
push   %rax
xor    %eax,%eax
call   1030 <alignbits@plt>
mov    $0x1b7,%edi
mov    $0x20,%esi
pop    %rax
jmp    1040 <putbits@plt>

LLVM IR (-O0):
define void @putseqend() {
%1 = call i32 (...) @alignbits()
%2 = call i32 @putbits(i32 439, i32 32)
ret void
}

LLVM IR (-O2):
define void @putseqend() {
%1 = tail call i32 (...) @alignbits()
%2 = tail call i32 @putbits(i32 439, i32 32)
ret void
}
int main(void) { return 53; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x35,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 53
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned char);
void i2c_delay(unsigned char msec) { usleep(msec * 1e3); }


x86 assembly (clang, -O0):
<i2c_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_delay>:
shl    $0x3,%edi
lea    (%rdi,%rdi,2),%eax
neg    %eax
movzbl %al,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @i2c_delay(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 1.000000e+03
%7 = fptoui double %6 to i8
%8 = call i32 @usleep(i8 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @i2c_delay(i8 zeroext %0) {
%2 = mul i8 %0, -24
%3 = tail call i32 @usleep(i8 zeroext %2)
ret void
}
/* Variables and functions */
scalar_t__ __builtin_y1l(long double);
int /*<<< orphan*/ link_failure_builtin_y1l();
void test_builtin_y1l(long double ld) {
  if (__builtin_y1l(ld) != __builtin_y1l(ld))
    link_failure_builtin_y1l();
}


x86 assembly (clang, -O0):
<test_builtin_y1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_y1l@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_y1l@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_builtin_y1l+0x43>
mov    $0x0,%al
call   1030 <link_failure_builtin_y1l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_y1l>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_y1l@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_y1l@plt>
cmp    %rax,%rbx
jne    1151 <test_builtin_y1l+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_y1l@plt>

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

LLVM IR (-O2):
define void @test_builtin_y1l(x86_fp80 %0) {
%2 = tail call i64 @__builtin_y1l(x86_fp80 %0)
%3 = tail call i64 @__builtin_y1l(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_y1l()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void error_exit(void) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<error_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<error_exit>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @error_exit() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @error_exit() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = tail call i32 @exit(i32 %1)
unreachable
}
long long szuz() { return 0xffff00007fff0000LL; }


x86 assembly (clang, -O0):
<szuz>:
push   %rbp
mov    %rsp,%rbp
movabs $0xffff00007fff0000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<szuz>:
movabs $0xffff00007fff0000,%rax
ret

LLVM IR (-O0):
define i64 @szuz() {
ret i64 -281472829292544
}

LLVM IR (-O2):
define i64 @szuz() {
ret i64 -281472829292544
}
/* Variables and functions */
int /*<<< orphan*/ sys_exit(int);
int /*<<< orphan*/ sys_puts(char *);
int main(void) {
  sys_puts("before exit\n");
  sys_exit(7);
  sys_puts("after exit\n");
  return 33;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <sys_puts@plt>
mov    $0x7,%edi
call   1030 <sys_exit@plt>
lea    0xec1(%rip),%rdi
call   1040 <sys_puts@plt>
mov    $0x21,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <sys_puts@plt>
mov    $0x7,%edi
call   1030 <sys_exit@plt>
lea    0xecf(%rip),%rdi
call   1040 <sys_puts@plt>
mov    $0x21,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"before exit\0A\00"
@.str.1 = [12 x i8] c"after exit\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sys_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sys_exit(i32 7)
%4 = call i32 @sys_puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 33
}

LLVM IR (-O2):
@.str = [13 x i8] c"before exit\0A\00"
@.str.1 = [12 x i8] c"after exit\0A\00"
define i32 @main() {
%1 = tail call i32 @sys_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @sys_exit(i32 7)
%3 = tail call i32 @sys_puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 33
}
int msm7x27_init_modemctl_device(struct modem_ctl *mc,
                                 struct modem_data *pdata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @msm7x27_init_modemctl_device(%struct.modem_ctl* %0, %struct.modem_data* %1) {
%3 = alloca %struct.modem_ctl*
%4 = alloca %struct.modem_data*
store %struct.modem_ctl* %0, %struct.modem_ctl** %3
store %struct.modem_data* %1, %struct.modem_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @msm7x27_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ destroy_dfftpack_cache();
extern void destroy_convolve_cache(void) { destroy_dfftpack_cache(); }


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

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

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

LLVM IR (-O2):
define void @destroy_convolve_cache() {
%1 = tail call i32 (...) @destroy_dfftpack_cache()
ret void
}
/* Type definitions */
struct group {
  int /*<<< orphan*/ gr_name;
};

/* Variables and functions */
struct group *getgrgid(unsigned int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
void group2str(unsigned gid, char *out) {
  struct group *gr = getgrgid(gid);
  if (gr) {
    strcpy(out, gr->gr_name);
  } else {
    sprintf(out, "%d", gid);
  }
}


x86 assembly (clang, -O0):
<group2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <getgrgid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116a <group2str+0x3a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1030 <strcpy@plt>
jmp    117d <group2str+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe88(%rip),%rsi
call   1050 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<group2str>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <getgrgid@plt>
test   %rax,%rax
je     1152 <group2str+0x22>
mov    (%rax),%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strcpy@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <sprintf@plt>

LLVM IR (-O0):
%struct.group = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @group2str(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.group*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = call %struct.group* @getgrgid(i32 %6)
store %struct.group* %7, %struct.group** %5
%8 = load %struct.group*, %struct.group** %5
%9 = icmp ne %struct.group* %8, null
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load %struct.group*, %struct.group** %5
%13 = getelementptr inbounds %struct.group, %struct.group* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @strcpy(i8* %11, i32 %14)
br label %20
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = load i32, i32* %3
%19 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %16, %10
ret void
}

LLVM IR (-O2):
%struct.group = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @group2str(i32 %0, i8* %1) {
%3 = tail call %struct.group* @getgrgid(i32 %0)
%4 = icmp eq %struct.group* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = getelementptr inbounds %struct.group, %struct.group* %3, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @strcpy(i8* %1, i32 %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %11
11: ; preds = %9, %5
ret void
}
int foo(void) {
  int i;
  volatile char *p = (volatile char[1]){77};
  for (i = 1; i < 10; i++)
    *p = 4;
  return *p;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movb   $0x4d,-0x11(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1136 <foo+0x36>
mov    -0x10(%rbp),%rax
movb   $0x4,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1117 <foo+0x17>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movb   $0x4d,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movb   $0x4,-0x1(%rsp)
movsbl -0x1(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i8
store volatile i8 77, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
store volatile i8 4, i8* %1
%2 = load volatile i8, i8* %1
%3 = sext i8 %2 to i32
ret i32 %3
}
void ath10k_testmode_destroy(struct ath10k *ar) {}


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

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

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

LLVM IR (-O2):
%struct.ath10k = type opaque
define void @ath10k_testmode_destroy(%struct.ath10k* nocapture %0) {
ret void
}
/* Variables and functions */
int MV_PlayLoopedWAV(char *, unsigned int, int, int, int, int, int, int, int,
                     unsigned int);
int MV_PlayWAV(char *ptr, unsigned int length, int pitchoffset, int vol,
               int left, int right, int priority, unsigned int callbackval) {
  int status;
  status = MV_PlayLoopedWAV(ptr, length, -1, -1, pitchoffset, vol, left, right,
                            priority, callbackval);
  return (status);
}


x86 assembly (clang, -O0):
<MV_PlayWAV>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%ebx
mov    -0x24(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    $0xffffffff,%ecx
mov    %ecx,%edx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <MV_PlayLoopedWAV@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<MV_PlayWAV>:
push   %rbx
mov    %r9d,%eax
mov    %r8d,%r10d
mov    %ecx,%r9d
mov    %edx,%r8d
mov    0x10(%rsp),%r11d
mov    0x18(%rsp),%ebx
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
push   %rbx
push   %r11
push   %rax
push   %r10
call   1030 <MV_PlayLoopedWAV@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MV_PlayWAV(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = load i32, i32* %16
%26 = call i32 @MV_PlayLoopedWAV(i8* %18, i32 %19, i32 -1, i32 -1, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25)
store i32 %26, i32* %17
%27 = load i32, i32* %17
ret i32 %27
}

LLVM IR (-O2):
define i32 @MV_PlayWAV(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @MV_PlayLoopedWAV(i8* %0, i32 %1, i32 -1, i32 -1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret i32 %9
}
float convert_fahr_celsius(float fahr) { return (fahr - 32.0) * (5.0 / 9.0); }


x86 assembly (clang, -O0):
<convert_fahr_celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeee(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_fahr_celsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @convert_fahr_celsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double %5, 0x3FE1C71C71C71C72
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @convert_fahr_celsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
int stbi__sse2_available(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @stbi__sse2_available() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void x(void *data) {
  if ((long)data < 0)
    abort();
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%rax
jge    1131 <x+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x>:
test   %rdi,%rdi
js     1116 <x+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @x(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @x(i8* readnone %0) {
%2 = icmp slt i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Type definitions */
struct eth_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DM9000_iow(int, int);
int /*<<< orphan*/ phy_write(int /*<<< orphan*/, int);
void dm9000_halt(struct eth_device *netdev) {
  ;
  phy_write(0, 0x8000);
  DM9000_iow(0x1f, 0x01);
  DM9000_iow(0xFF, 0x80);
  DM9000_iow(0x05, 0x00);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x8000,%esi
call   1040 <phy_write@plt>
mov    $0x1f,%edi
mov    $0x1,%esi
call   1030 <DM9000_iow@plt>
mov    $0xff,%edi
mov    $0x80,%esi
call   1030 <DM9000_iow@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <DM9000_iow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %edi,%edi
mov    $0x8000,%esi
call   1040 <phy_write@plt>
mov    $0x1f,%edi
mov    $0x1,%esi
call   1030 <DM9000_iow@plt>
mov    $0xff,%edi
mov    $0x80,%esi
call   1030 <DM9000_iow@plt>
mov    $0x5,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <DM9000_iow@plt>

LLVM IR (-O0):
%struct.eth_device = type { i32 }
define void @dm9000_halt(%struct.eth_device* %0) {
%2 = alloca %struct.eth_device*
store %struct.eth_device* %0, %struct.eth_device** %2
%3 = call i32 @phy_write(i32 0, i32 32768)
%4 = call i32 @DM9000_iow(i32 31, i32 1)
%5 = call i32 @DM9000_iow(i32 255, i32 128)
%6 = call i32 @DM9000_iow(i32 5, i32 0)
ret void
}

LLVM IR (-O2):
%struct.eth_device = type { i32 }
define void @dm9000_halt(%struct.eth_device* nocapture readnone %0) {
%2 = tail call i32 @phy_write(i32 0, i32 32768)
%3 = tail call i32 @DM9000_iow(i32 31, i32 1)
%4 = tail call i32 @DM9000_iow(i32 255, i32 128)
%5 = tail call i32 @DM9000_iow(i32 5, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __aeabi_memset8_impl(void *, size_t, int /*<<< orphan*/);
void __attribute__((weak)) __aeabi_memclr8_impl(void *dest, size_t n) {
  __aeabi_memset8_impl(dest, n, 0);
}


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

x86 assembly (clang, -O2):
<__aeabi_memclr8_impl>:
xor    %edx,%edx
jmp    1030 <__aeabi_memset8_impl@plt>

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

LLVM IR (-O2):
define weak void @__aeabi_memclr8_impl(i8* %0, i64 %1) {
%3 = tail call i32 @__aeabi_memset8_impl(i8* %0, i64 %1, i32 0)
ret void
}
void align_graph(struct config_file *cfg) {}


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

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

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

LLVM IR (-O2):
%struct.config_file = type opaque
define void @align_graph(%struct.config_file* nocapture %0) {
ret void
}