#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ parse_ovp_disassembled_line(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
void test_parse_ovp_disassembled_line() {
  char buffer[2][100];
  parse_ovp_disassembled_line("d0fc     ldr     r1,[pc,#360]", buffer[0],
                              buffer[1]);
  assert(strcmp(buffer[0], "ldr") == 0);
  assert(strcmp(buffer[1], "r1, [pc, #360]") == 0);
  parse_ovp_disassembled_line("d0fc     nop", buffer[0], buffer[1]);
  assert(strcmp(buffer[0], "nop") == 0);
  assert(strcmp(buffer[1], "") == 0);
}


x86 assembly (clang, -O0):
<test_parse_ovp_disassembled_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
lea    -0xd0(%rbp),%rsi
lea    -0xd0(%rbp),%rdx
add    $0x64,%rdx
lea    0xeac(%rip),%rdi
call   1050 <parse_ovp_disassembled_line@plt>
lea    -0xd0(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0xd0(%rbp),%rdi
add    $0x64,%rdi
lea    0xe93(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0xd0(%rbp),%rsi
lea    -0xd0(%rbp),%rdx
add    $0x64,%rdx
lea    0xe73(%rip),%rdi
call   1050 <parse_ovp_disassembled_line@plt>
lea    -0xd0(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0xd0(%rbp),%rdi
add    $0x64,%rdi
lea    0xe37(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_parse_ovp_disassembled_line>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
lea    0x64(%rsp),%r14
lea    0xeba(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <parse_ovp_disassembled_line@plt>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
lea    0xeaa(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <parse_ovp_disassembled_line@plt>
lea    0xe93(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
lea    0xe6c(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"d0fc ldr r1,[pc,]\00"
@.str.1 = [4 x i8] c"ldr\00"
@.str.2 = [15 x i8] c"r1, [pc,]\00"
@.str.3 = [13 x i8] c"d0fc nop\00"
@.str.4 = [4 x i8] c"nop\00"
@.str.5 = [1 x i8] zeroinitializer
define void @test_parse_ovp_disassembled_line() {
%1 = alloca [2 x [100 x i8]]
%2 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = call i32 @parse_ovp_disassembled_line(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5)
%7 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%21 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %21, i64 0, i64 0
%23 = call i32 @parse_ovp_disassembled_line(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %20, i8* %22)
%24 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %24, i64 0, i64 0
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %30, i64 0, i64 0
%32 = call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"d0fc ldr r1,[pc,]\00"
@.str.1 = [4 x i8] c"ldr\00"
@.str.2 = [15 x i8] c"r1, [pc,]\00"
@.str.3 = [13 x i8] c"d0fc nop\00"
@.str.4 = [4 x i8] c"nop\00"
@.str.5 = [1 x i8] zeroinitializer
define void @test_parse_ovp_disassembled_line() {
%1 = alloca [2 x [100 x i8]]
%2 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0, i64 0
%3 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1, i64 0
%4 = call i32 @parse_ovp_disassembled_line(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @parse_ovp_disassembled_line(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %2, i8* %3)
%14 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
ret void
}