xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_nix_line_comments() {
  test_parser_verify_parse(test_parser_sourcefile("nix", "# comment"), "nix",
                           "", "# comment", 0);
}


x86 assembly (clang, -O0):
<test_nix_line_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec6(%rip),%rdx
lea    0xeb6(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nix_line_comments>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed2(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xec9(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rcx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"nix\00"
@.str.1 = [10 x i8] c"# comment\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_nix_line_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"nix\00"
@.str.1 = [10 x i8] c"# comment\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_nix_line_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int ctr_drbg_random_with_add(void *, unsigned char *, size_t,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
int ctr_drbg_random(void *p_rng, unsigned char *output, size_t output_len) {
  return ctr_drbg_random_with_add(p_rng, output, output_len, NULL, 0);
}


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

x86 assembly (clang, -O2):
<ctr_drbg_random>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <ctr_drbg_random_with_add@plt>

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

LLVM IR (-O2):
define i32 @ctr_drbg_random(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @ctr_drbg_random_with_add(i8* %0, i8* %1, i64 %2, i32* null, i32 0)
ret i32 %4
}
/* Variables and functions */
int enum1();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", enum1());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <enum1@plt>
mov    %eax,%esi
lea    0xeba(%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 <enum1@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @enum1()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g2_reg_cleanup();
void g2_cleanup(void) { g2_reg_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @g2_cleanup() {
%1 = tail call i32 (...) @g2_reg_cleanup()
ret void
}
/* Variables and functions */
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("My PID:  %d\n", getpid());
  printf("My PPID: %d\n", getppid());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"My PID: %d\0A\00"
@.str.1 = [13 x i8] c"My PPID: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @getppid()
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"My PID: %d\0A\00"
@.str.1 = [13 x i8] c"My PPID: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @getppid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct device_d {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WARN_ON(int);
int device_reset_us(struct device_d *dev, int us) {
  WARN_ON(1);
  return 0;
}


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

x86 assembly (clang, -O2):
<device_reset_us>:
push   %rax
mov    $0x1,%edi
call   1030 <WARN_ON@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.device_d = type { i32 }
define i32 @device_reset_us(%struct.device_d* %0, i32 %1) {
%3 = alloca %struct.device_d*
%4 = alloca i32
store %struct.device_d* %0, %struct.device_d** %3
store i32 %1, i32* %4
%5 = call i32 @WARN_ON(i32 1)
ret i32 0
}

LLVM IR (-O2):
%struct.device_d = type { i32 }
define i32 @device_reset_us(%struct.device_d* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @WARN_ON(i32 1)
ret i32 0
}
int execute_fsetxattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_fsetxattr() {
ret i32 0
}
/* Type definitions */
struct predicate {
  int dummy;
};
struct parser_table {
  int dummy;
};

/* Variables and functions */
struct predicate *insert_primary(struct parser_table const *);
bool parse_true(const struct parser_table *entry, char **argv, int *arg_ptr) {
  struct predicate *pred = insert_primary(entry);
  return true;
}


x86 assembly (clang, -O0):
<parse_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <insert_primary@plt>
mov    %rax,-0x20(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_true>:
push   %rax
call   1030 <insert_primary@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.parser_table = type { i32 }
%struct.predicate = type { i32 }
define i32 @parse_true(%struct.parser_table* %0, i8** %1, i32* %2) {
%4 = alloca %struct.parser_table*
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca %struct.predicate*
store %struct.parser_table* %0, %struct.parser_table** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%8 = load %struct.parser_table*, %struct.parser_table** %4
%9 = call %struct.predicate* @insert_primary(%struct.parser_table* %8)
store %struct.predicate* %9, %struct.predicate** %7
ret i32 1
}

LLVM IR (-O2):
%struct.parser_table = type { i32 }
%struct.predicate = type { i32 }
define i32 @parse_true(%struct.parser_table* %0, i8** nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call %struct.predicate* @insert_primary(%struct.parser_table* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x07() {
  Assert_real((islower(7) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              40, ("islower should be 0 for 0x07"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x07\00"
define void @t_islower_0x07() {
%1 = tail call i64 @islower(i32 7)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putnbr(int);
void ft_sub(int a, int b) {
  ft_putnbr(a - b);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sub>:
push   %rax
sub    %esi,%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_sub(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = call i32 @ft_putnbr(i32 %7)
%9 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @ft_putnbr(i32 %3)
%5 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ vwarn_work(char const *, int /*<<< orphan*/, int);
extern void vwarn(const char *format, va_list args) {
  vwarn_work(format, args, 1);
}


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

x86 assembly (clang, -O2):
<vwarn>:
mov    $0x1,%edx
jmp    1030 <vwarn_work@plt>

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

LLVM IR (-O2):
define void @vwarn(i8* %0, i32 %1) {
%3 = tail call i32 @vwarn_work(i8* %0, i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgText();
char *TextOf(int /*<<< orphan*/);
int /*<<< orphan*/ rwhocli_setup(char *, char *, char *, char *);
void Act_RwhoDeclareUp(void) {
  char *mudname = TextOf(ArgText());
  char *mudident = TextOf(ArgText());
  char *server = TextOf(ArgText());
  char *serverpw = TextOf(ArgText());
  rwhocli_setup(server, serverpw, mudname, mudident);
}


x86 assembly (clang, -O0):
<Act_RwhoDeclareUp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
call   1040 <rwhocli_setup@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_RwhoDeclareUp>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <rwhocli_setup@plt>

LLVM IR (-O0):
define void @Act_RwhoDeclareUp() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = call i32 (...) @ArgText()
%6 = call i8* @TextOf(i32 %5)
store i8* %6, i8** %1
%7 = call i32 (...) @ArgText()
%8 = call i8* @TextOf(i32 %7)
store i8* %8, i8** %2
%9 = call i32 (...) @ArgText()
%10 = call i8* @TextOf(i32 %9)
store i8* %10, i8** %3
%11 = call i32 (...) @ArgText()
%12 = call i8* @TextOf(i32 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %1
%16 = load i8*, i8** %2
%17 = call i32 @rwhocli_setup(i8* %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
define void @Act_RwhoDeclareUp() {
%1 = tail call i32 (...) @ArgText()
%2 = tail call i8* @TextOf(i32 %1)
%3 = tail call i32 (...) @ArgText()
%4 = tail call i8* @TextOf(i32 %3)
%5 = tail call i32 (...) @ArgText()
%6 = tail call i8* @TextOf(i32 %5)
%7 = tail call i32 (...) @ArgText()
%8 = tail call i8* @TextOf(i32 %7)
%9 = tail call i32 @rwhocli_setup(i8* %6, i8* %8, i8* %2, i8* %4)
ret void
}
int delete2(char *filename) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @delete2(i8* nocapture readnone %0) {
ret i32 -1
}
int test_imm_57uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x57 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_57uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 373662154752
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int clear_bit(int *x, int i) { return x[i / 8] &= ~(1 << (i % 8)); }


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    $0x8,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x10(%rbp),%eax
movslq %edx,%rdx
and    (%rcx,%rdx,4),%eax
mov    %eax,(%rcx,%rdx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %esi,%ecx
and    $0x7,%cl
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
movslq %eax,%rdx
mov    (%rdi,%rdx,4),%eax
btr    %ecx,%eax
mov    %eax,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define i32 @clear_bit(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 = srem i32 %5, 8
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %8
store i32 %15, i32* %13
ret i32 %15
}

LLVM IR (-O2):
define i32 @clear_bit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = xor i32 %4, -1
%6 = sdiv i32 %1, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %5
store i32 %10, i32* %8
ret i32 %10
}
void remsBIL() {}


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

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

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

LLVM IR (-O2):
define void @remsBIL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMREF_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMREF_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMREF_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void duplicate_carry(int n) {
  int i;
  for (i = 0; i <= n; i++)
    printf("\t");
  printf("COPY_CARRY (&regs->ccrflags);\n");
}


x86 assembly (clang, -O0):
<duplicate_carry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1148 <duplicate_carry+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <duplicate_carry+0x12>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duplicate_carry>:
push   %rbx
test   %edi,%edi
js     113f <duplicate_carry+0x1f>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <duplicate_carry+0x10>
lea    0xeba(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [30 x i8] c"COPY_CARRY (&regs->ccrflags);\00"
define void @duplicate_carry(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
unsigned short mk_rnd_u16() { return (rand() & 0xffff); }


x86 assembly (clang, -O0):
<mk_rnd_u16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xffff,%eax
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @mk_rnd_u16() {
%1 = call i32 (...) @rand()
%2 = and i32 %1, 65535
%3 = trunc i32 %2 to i16
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @mk_rnd_u16() {
%1 = tail call i32 (...) @rand()
%2 = trunc i32 %1 to i16
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handler() {
  printf("signal was called\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"signal was called\0A\00"
define void @handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"signal was called\00"
define void @handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
int is_zero(float v) { return (v > -0.000001f && v < 0.000001f); }


x86 assembly (clang, -O0):
<is_zero>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
movss  0xee8(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x5(%rbp)
jbe    1136 <is_zero+0x36>
movss  0xed8(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
seta   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zero>:
ucomiss 0xef9(%rip),%xmm0
seta   %al
movss  0xef2(%rip),%xmm1
ucomiss %xmm0,%xmm1
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_zero(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0xBEB0C6F7A0000000
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fcmp olt float %6, 0x3EB0C6F7A0000000
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_zero(float %0) {
%2 = fcmp ogt float %0, 0xBEB0C6F7A0000000
%3 = fcmp olt float %0, 0x3EB0C6F7A0000000
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(unsigned int, int /*<<< orphan*/ *);
void fputDword(unsigned int value, FILE *file) {
  fputc((value & 0xFF), file);
  fputc(((value >> 8) & 0xFF), file);
  fputc(((value >> 16) & 0xFF), file);
  fputc(((value >> 24) & 0xFF), file);
}


x86 assembly (clang, -O0):
<fputDword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%edi
shr    $0x8,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%edi
shr    $0x10,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%edi
shr    $0x18,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputDword>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @fputDword(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = call i32 @fputc(i32 %6, i32* %7)
%9 = load i32, i32* %3
%10 = lshr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = call i32 @fputc(i32 %11, i32* %12)
%14 = load i32, i32* %3
%15 = lshr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %4
%18 = call i32 @fputc(i32 %16, i32* %17)
%19 = load i32, i32* %3
%20 = lshr i32 %19, 24
%21 = and i32 %20, 255
%22 = load i32*, i32** %4
%23 = call i32 @fputc(i32 %21, i32* %22)
ret void
}

LLVM IR (-O2):
define void @fputDword(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 255
%4 = tail call i32 @fputc(i32 %3, i32* %1)
%5 = lshr i32 %0, 8
%6 = and i32 %5, 255
%7 = tail call i32 @fputc(i32 %6, i32* %1)
%8 = lshr i32 %0, 16
%9 = and i32 %8, 255
%10 = tail call i32 @fputc(i32 %9, i32* %1)
%11 = lshr i32 %0, 24
%12 = tail call i32 @fputc(i32 %11, i32* %1)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ pthread_exit(int *);
int rand();
int /*<<< orphan*/ swizzle(int *);
int /*<<< orphan*/ usleep(int);
void *accessorThread(void *arg) {
  int *result = (int *)malloc(sizeof(int));
  ;
  *result = 0;
  while (*result < 100) {
    swizzle(result);
    usleep(10 + (rand() % 100));
  }
  pthread_exit(result);
}


x86 assembly (clang, -O0):
<accessorThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x64,(%rax)
jge    11a8 <accessorThread+0x58>
mov    -0x18(%rbp),%rdi
call   1050 <swizzle@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0xa,%edi
call   1070 <usleep@plt>
jmp    1174 <accessorThread+0x24>
mov    -0x18(%rbp),%rdi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accessorThread>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1050 <swizzle@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0xa,%edi
call   1070 <usleep@plt>
cmpl   $0x64,(%rbx)
jl     1170 <accessorThread+0x20>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @accessorThread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %4
%7 = load i32*, i32** %4
store i32 0, i32* %7
br label %8
8: ; preds = %12, %1
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, 100
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = call i32 @swizzle(i32* %13)
%15 = call i32 (...) @rand()
%16 = srem i32 %15, 100
%17 = add nsw i32 10, %16
%18 = call i32 @usleep(i32 %17)
br label %8
19: ; preds = %8
%20 = load i32*, i32** %4
%21 = call i32 @pthread_exit(i32* %20)
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @accessorThread(i8* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 0, i32* %3
br label %4
4: ; preds = %1, %4
%5 = tail call i32 @swizzle(i32* %3)
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 100
%8 = add nsw i32 %7, 10
%9 = tail call i32 @usleep(i32 %8)
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 100
br i1 %11, label %4, label %12
12: ; preds = %4
%13 = tail call i32 @pthread_exit(i32* %3)
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ add_transfer(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ pabort(char *);
void make_bulk_transfer(int len) {
  uint8_t *buf = malloc(len);
  if (NULL == buf)
    pabort("malloc failed");
  memset(buf, 0xCB, len);
  add_transfer(buf, len);
}


x86 assembly (clang, -O0):
<make_bulk_transfer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    116f <make_bulk_transfer+0x2f>
lea    0xe96(%rip),%rdi
call   1060 <pabort@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0xcb,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <add_transfer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_bulk_transfer>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115e <make_bulk_transfer+0x1e>
lea    0xea7(%rip),%rdi
call   1060 <pabort@plt>
mov    %rbx,%rdi
mov    $0xcb,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <add_transfer@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"malloc failed\00"
define void @make_bulk_transfer(i32 %0) {
%2 = tail call i32* @malloc(i32 %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pabort(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i32* %2, i32 203, i32 %0)
%8 = tail call i32 @add_transfer(i32* %2, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Ws(char *);
int /*<<< orphan*/ wRelative12(int, int);
int WinstC(int i, int code) {
  Ws("rjmp  ");
  wRelative12(i, code);
  return 0;
}


x86 assembly (clang, -O0):
<WinstC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <wRelative12@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WinstC>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
call   1030 <Ws@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <wRelative12@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"rjmp \00"
define i32 @WinstC(i32 %0, i32 %1) {
%3 = tail call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @wRelative12(i32 %0, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void zylons() { print("Sorry, no LED's on the WinBond W89k board\r\n"); }


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"Sorry, no LED's on the WinBond W89k board\0D\0A\00"
define void @zylons() {
%1 = call i32 @print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Sorry, no LED's on the WinBond W89k board\0D\0A\00"
define void @zylons() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ cpu_nswap32p(int /*<<< orphan*/ *, int /*<<< orphan*/);
void cpu_to_le32p(uint32_t *outp, uint32_t in) { cpu_nswap32p(outp, in); }


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

x86 assembly (clang, -O2):
<cpu_to_le32p>:
jmp    1030 <cpu_nswap32p@plt>

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

LLVM IR (-O2):
define void @cpu_to_le32p(i32* %0, i32 %1) {
%3 = tail call i32 @cpu_nswap32p(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_print(int /*<<< orphan*/);
int /*<<< orphan*/ trim_before(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  int i;
  i = 0;
  if (argc == 2 && argv[1][0] != '\0') {
    ft_print(trim_before(argv[1]));
  }
  write(1, "\n", 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    117f <main+0x4f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117f <main+0x4f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <trim_before@plt>
mov    %eax,%edi
call   1050 <ft_print@plt>
mov    $0x1,%edx
lea    0xe75(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    114b <main+0x1b>
mov    0x8(%rsi),%rdi
cmpb   $0x0,(%rdi)
je     114b <main+0x1b>
call   1040 <trim_before@plt>
mov    %eax,%edi
call   1050 <ft_print@plt>
lea    0xeae(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %23
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %9
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32 @trim_before(i8* %20)
%22 = call i32 @ft_print(i32 %21)
br label %23
23: ; preds = %17, %9, %2
%24 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = tail call i32 @trim_before(i8* %6)
%11 = tail call i32 @ft_print(i32 %10)
br label %12
12: ; preds = %9, %4, %2
%13 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
void OCSP_CERTID_new(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_CERTID_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void test_main(void) { close(1); }


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

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

LLVM IR (-O0):
define void @test_main() {
%1 = call i32 @close(i32 1)
ret void
}

LLVM IR (-O2):
define void @test_main() {
%1 = tail call i32 @close(i32 1)
ret void
}
unsigned rotate_left(unsigned x, unsigned n) {
  int z_mask = -!n;
  unsigned left = x << n;
  unsigned right = x >> ((sizeof(unsigned) << 3) - n);
  return (z_mask & x) | (~z_mask & (left | right));
}


x86 assembly (clang, -O0):
<rotate_left>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x20,%ecx
sub    %rdx,%rcx
shr    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x10(%rbp),%edx
or     -0x14(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_left>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rotate_left(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = sub nsw i32 0, %11
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = shl i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = zext i32 %17 to i64
%19 = sub i64 32, %18
%20 = trunc i64 %19 to i32
%21 = lshr i32 %16, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %3
%24 = and i32 %22, %23
%25 = load i32, i32* %5
%26 = xor i32 %25, -1
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = or i32 %27, %28
%30 = and i32 %26, %29
%31 = or i32 %24, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @rotate_left(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
void gtk_color_button_get_color() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_button_get_color() {
ret void
}
int __ffs(x)
int x;
{
  int cnt;
  int tmp;
  asm("xorl %0,%0\n"
      "bsfl %2,%1\n"
      "jz 1f\n"
      "leal 1(%1),%0\n"
      "1:"
      : "=&a"(cnt), "=r"(tmp)
      : "rm"(x));
  return cnt;
}


x86 assembly (clang, -O0):
<__ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
bsf    -0x10(%rbp),%ecx
je     111d <__ffs+0x1d>
lea    0x1(%ecx),%eax
mov    %ecx,-0x14(%rbp)
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ffs>:
mov    %edi,-0x4(%rsp)
xor    %eax,%eax
bsf    -0x4(%rsp),%ecx
je     1111 <__ffs+0x11>
lea    0x1(%ecx),%eax
ret

LLVM IR (-O0):
define i32 @__ffs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call { i32, i32 } asm "xorl $0,$0\0Absfl $2,$1\0Ajz 1f\0Aleal 1($1),$0\0A1:", "=&{ax},=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %5)
%7 = extractvalue { i32, i32 } %6, 0
%8 = extractvalue { i32, i32 } %6, 1
store i32 %7, i32* %3
store i32 %8, i32* %4
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @__ffs(i32 %0) {
%2 = tail call { i32, i32 } asm "xorl $0,$0\0Absfl $2,$1\0Ajz 1f\0Aleal 1($1),$0\0A1:", "=&{ax},=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = extractvalue { i32, i32 } %2, 0
ret i32 %3
}
unsigned short inw(int port) {
  unsigned short value;
  __asm__ __volatile__("inw %w1, %0" : "=a"(value) : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @inw(i32 %0) {
%2 = tail call i16 asm sideeffect "inw ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_strlist_next() {
  printf("NOT IMPLEMENTED:"
         "pa_strlist_next"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_strlist_next\0A\00"
define i32 @pa_strlist_next() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_strlist_next\00"
define i32 @pa_strlist_next() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
main() { return -5 < 10U; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void kfree(void *p) {
  if (p == 0)
    return;
  free(p);
}


x86 assembly (clang, -O0):
<kfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <kfree+0x1c>
jmp    1135 <kfree+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @kfree(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 = %1, %3
ret void
}
/* Variables and functions */
int atoi(char const *);
int soru_3(const char *s1, const char *s2) {
  int x, y;
  x = atoi(s1);
  y = atoi(s2);
  return x + y;
}


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

x86 assembly (clang, -O2):
<soru_3>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <atoi@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @soru_3(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @atoi(i8* %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @soru_3(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = tail call i32 @atoi(i8* %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}
__attribute__((always_)) unsigned int readl(const volatile void *addr) {
  return *(volatile unsigned int *)addr;
}


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

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

LLVM IR (-O0):
define i32 @readl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @readl(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}