#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *info;
  int /*<<< orphan*/ *id;
};
typedef TYPE_1__ SRP_user_pwd;

/* Variables and functions */
void *BUF_strdup(char const *);
int SRP_user_pwd_set_ids(SRP_user_pwd *vinfo, const char *id,
                         const char *info) {
  if (id != NULL && NULL == (vinfo->id = BUF_strdup(id)))
    return 0;
  return (info == NULL || NULL != (vinfo->info = BUF_strdup(info)));
}


x86 assembly (clang, -O0):
<SRP_user_pwd_set_ids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115a <SRP_user_pwd_set_ids+0x4a>
mov    -0x18(%rbp),%rdi
call   1030 <BUF_strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
xor    %eax,%eax
cmp    %rcx,%rax
jne    115a <SRP_user_pwd_set_ids+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1193 <SRP_user_pwd_set_ids+0x83>
mov    $0x1,%al
cmpq   $0x0,-0x20(%rbp)
mov    %al,-0x21(%rbp)
je     1188 <SRP_user_pwd_set_ids+0x78>
mov    -0x20(%rbp),%rdi
call   1030 <BUF_strdup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
cmp    %rcx,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SRP_user_pwd_set_ids>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     1130 <SRP_user_pwd_set_ids+0x20>
mov    %rsi,%rdi
call   1030 <BUF_strdup@plt>
mov    %rax,0x8(%r14)
test   %rax,%rax
je     1154 <SRP_user_pwd_set_ids+0x44>
test   %rbx,%rbx
je     114d <SRP_user_pwd_set_ids+0x3d>
mov    %rbx,%rdi
call   1030 <BUF_strdup@plt>
mov    %rax,%rcx
mov    %rax,(%r14)
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1156 <SRP_user_pwd_set_ids+0x46>
mov    $0x1,%eax
jmp    1156 <SRP_user_pwd_set_ids+0x46>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32*, i32* }
define i32 @SRP_user_pwd_set_ids(%struct.TYPE_3__* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
%7 = alloca i8*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i8* @BUF_strdup(i8* %11)
%13 = bitcast i8* %12 to i32*
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 1
store i32* %13, i32** %15
%16 = icmp eq i32* null, %13
br i1 %16, label %17, label %18
17: ; preds = %10
store i32 0, i32* %4
br label %31
18: ; preds = %10, %3
%19 = load i8*, i8** %7
%20 = icmp eq i8* %19, null
br i1 %20, label %28, label %21
21: ; preds = %18
%22 = load i8*, i8** %7
%23 = call i8* @BUF_strdup(i8* %22)
%24 = bitcast i8* %23 to i32*
%25 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %25, i32 0, i32 0
store i32* %24, i32** %26
%27 = icmp ne i32* null, %24
br label %28
28: ; preds = %21, %18
%29 = phi i1 [ true, %18 ], [ %27, %21 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %4
br label %31
31: ; preds = %28, %17
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32*, i32* }
define i32 @SRP_user_pwd_set_ids(%struct.TYPE_3__* nocapture writeonly %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call i8* @BUF_strdup(i8* %1)
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%8 = bitcast i32** %7 to i8**
store i8* %6, i8** %8
%9 = icmp eq i8* %6, null
br i1 %9, label %17, label %10
10: ; preds = %5, %3
%11 = icmp eq i8* %2, null
br i1 %11, label %17, label %12
12: ; preds = %10
%13 = tail call i8* @BUF_strdup(i8* %2)
%14 = bitcast %struct.TYPE_3__* %0 to i8**
store i8* %13, i8** %14
%15 = icmp ne i8* %13, null
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %10, %12, %5
%18 = phi i32 [ 0, %5 ], [ 1, %10 ], [ %16, %12 ]
ret i32 %18
}